fexpect icon indicating copy to clipboard operation
fexpect copied to clipboard

extra '\r' in command output

Open jererc opened this issue 12 years ago • 10 comments

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

jererc avatar Jun 14 '12 12:06 jererc

Yes, I'll gladly look into this. Do you happen to have some example output and the corresponding script?

JasperVanDenBosch avatar Jun 14 '12 13:06 JasperVanDenBosch

hey

http://pastebin.com/KCASAkHj

jererc avatar Jun 14 '12 13:06 jererc

Thank you! I think I can fix this tonight.

JasperVanDenBosch avatar Jun 14 '12 13:06 JasperVanDenBosch

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 ?

jererc avatar Jun 14 '12 14:06 jererc

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.

JasperVanDenBosch avatar Jun 14 '12 23:06 JasperVanDenBosch

Hello I finally did my own lightweight expect using paramiko Channel, for speed purpose. I'll check your work out. Thanks

jererc avatar Jun 15 '12 06:06 jererc

http://pastebin.com/WRRWf6jv

Feedbacks are welcome =)

jererc avatar Jun 15 '12 08:06 jererc

Just created a repo there if you're interested or if you have suggestions: https://github.com/jererc/sshex-py

Jerome

jererc avatar Jun 15 '12 18:06 jererc

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 :)

JasperVanDenBosch avatar Jun 15 '12 18:06 JasperVanDenBosch

Well, i'm using my own project. Although, i'm still interested in a fabric contrib with expect.

Thank you for the reactivity! =)

jererc avatar Jun 15 '12 18:06 jererc