Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Redirecting output to a string

Reply
Thread Tools

Redirecting output to a string

 
 
KartheeK KartheeK is offline
Junior Member
Join Date: Mar 2008
Posts: 1
 
      03-19-2008
Hi All,

I am trying to access the contents of a file in a remote machine and capture the contents on to a 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.

Regards,

KartheeK
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting unittest output to a Text widget MrBlueSky Python 2 05-10-2006 08:22 AM
Redirecting print output to different queues / printers Paul Aspinall ASP .Net 0 02-26-2006 12:02 PM
RE: Redirecting system output quietly Eddie Parker Python 4 11-16-2004 06:01 PM
Textfield output redirecting Olivier Merigon Java 1 05-18-2004 09:15 PM
stdout funniness from os.system() calls when redirecting output Birch Python 3 10-21-2003 04:16 PM



Advertisments