[BangPypers] Redirecting output to a string

KartheeK kartheekpn at yahoo.co.in
Wed Mar 19 04:21:42 CET 2008

Hi All,

I am trying to access the contents of a file in a remote machine and store the contents in string.

The command,
os.execv(ssh, [ssh, "-l", user, ip] + ['cat /tmp/temp.conf']
works but displays the output on to the screen.

I tried,
to_be_analysed_txt = os.execv(ssh, [ssh, "-l", user, ip] + ['cat /tmp/temp.conf']
but that does not work out.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/bangpypers/attachments/20080319/1b925373/attachment.htm 

More information about the BangPypers mailing list