fgimian / paramiko-expect

A Python expect-like extension for the Paramiko SSH library which also supports tailing logs.
MIT License
204 stars 78 forks source link

A better way to stop tail() call #8

Closed cvmiller closed 7 years ago

cvmiller commented 9 years ago

paramiko-expect is a very useful addition to paramiko itself. The documentation could be improved to give more examples of how to use the timeout and other options.

cvmiller commented 8 years ago

Thanks! That looks great.

Craig...

IPv6 is the future! http://ipv6-net.blogspot.ca/

On Sat, Feb 27, 2016 at 6:26 PM, Fotis Gimian notifications@github.com wrote:

Closed #8 https://github.com/fgimian/paramiko-expect/issues/8 via 82c2a22 https://github.com/fgimian/paramiko-expect/commit/82c2a222d01aa118c9de5c132b8f5f210cc3e3f2 .

— Reply to this email directly or view it on GitHub https://github.com/fgimian/paramiko-expect/issues/8#event-569425133.

fgimian commented 8 years ago

No worries Craig, I actually made a little error, it will be fixed on the next commit in 5 minutes :smile:

NakitaOza commented 8 years ago

This is an excellent library! It would be great if you could add a timeout option for tail functionality in python2.7 so that it can be stopped after specified time(like 5 hrs or so). Hence, we wont need a ctrl+c interrupt if we plan on using it for automation.

Thanks for paramikoe, it has been very very useful!

fgimian commented 8 years ago

@Anonymous98 thanks for the feedback. I think that the tail function could use revisiting in general as it writes to stdout. We could potentially use the return of a callback to indicate when the tailing should stop. This will allow people to automatically stop after a line is received or after a pre-defined set of time via a custom callback.

I've re-opened this and may examine this as an option in the near future 😄

fruch commented 7 years ago

close, done in #24 now we have stop_callback parameter that can stop the tail() function