Redirecting output to a string

Discussion in 'Python' started by KartheeK, Mar 19, 2008.

  1. KartheeK

    KartheeK

    Joined:
    Mar 19, 2008
    Messages:
    1
    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
    KartheeK, Mar 19, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Aspinall
    Replies:
    0
    Views:
    357
    Paul Aspinall
    Feb 26, 2006
  2. Olivier Merigon

    Textfield output redirecting

    Olivier Merigon, May 3, 2004, in forum: Java
    Replies:
    1
    Views:
    902
    mromarkhan@rogers.com
    May 18, 2004
  3. Birch
    Replies:
    3
    Views:
    1,012
    Birch
    Oct 21, 2003
  4. Eddie Parker

    RE: Redirecting system output quietly

    Eddie Parker, Nov 16, 2004, in forum: Python
    Replies:
    4
    Views:
    397
    Donn Cave
    Nov 16, 2004
  5. MrBlueSky
    Replies:
    2
    Views:
    344
    MrBlueSky
    May 10, 2006
Loading...

Share This Page