fexpect
fexpect copied to clipboard
extra '\r' in command output
Hello
is it possible to correct the output, which has extra '\r' at the end of lines than with the fabric commands ?
Jérôme
Yes, I'll gladly look into this. Do you happen to have some example output and the corresponding script?
hey
http://pastebin.com/KCASAkHj
Thank you! I think I can fix this tonight.
Actually, is it possible to get the same exact output than when running the command like fabric run/sudo/local methods (without the pexpect 'before' attr content and "Exiting fexpect for EOF.") and also the pexpect 'exit_status' attribute if needed ?
Okay, I need a bit more time, perhaps tomorrow. Some of these things are pexpect internal, but we can workaround by changing the output as you did. I will create some verbosity settings and in the end it should be possible for it to create the same output as regular run/sudo/local.
Hello I finally did my own lightweight expect using paramiko Channel, for speed purpose. I'll check your work out. Thanks
http://pastebin.com/WRRWf6jv
Feedbacks are welcome =)
Just created a repo there if you're interested or if you have suggestions: https://github.com/jererc/sshex-py
Jerome
I will definitely have a look. Which of the features you mentioned before would you still like to see in fexpect? Or will you switch to sshex-py entirely? Just so I know where to put my priorities :)
Well, i'm using my own project. Although, i'm still interested in a fabric contrib with expect.
Thank you for the reactivity! =)