fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fabric - Multiple watcher/responder support???


From: Jeff Forcier
Subject: Re: Fabric - Multiple watcher/responder support???
Date: Fri, 29 May 2020 09:04:25 -0400

Hi Chris,

The watchers= argument to run() accepts a list of Watcher objects, so yes, you should definitely be able to have multiple such instances watching the subprocess' streams at the same time. http://docs.pyinvoke.org/en/latest/concepts/watchers.html

I haven't personally done a lot of complex stuff this way yet (mostly responding to individual prompts) but that was the intent of the design. Definitely interested to hear how it works out for you, or if there's issues that need addressing!

Best,
Jeff

On Thu, May 28, 2020 at 5:35 PM barbariannerd <barbariannerd@gmail.com> wrote:

Hey Guys,

Could not find any Google hits on this.  I am using Fabric in Python v3 and have a need for multiple watcher/responders on a run  command.  Can it do it or do I have to go to something like pexpect/paramiko?  An example scenerio is a password reset for one of our storage devices that does the normal new password prompt/repeat new password prompt but then it spews out a paragraph of text with the last item saying "press 'Y' to process" (without a OS prompt).

Thoughts?  Kinda like trying to walk through a text menu without the OS prompts.

Thanks!

Chris Thomas

Sent via the Samsung Galaxy S10e, an AT&T 5G Evolution capable smartphone



--
Jeff Forcier
Unix sysadmin; Python engineer
http://bitprophet.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]