popen4 not returning output

hortitude at gmail.com hortitude at gmail.com
Sun Aug 19 23:58:38 EDT 2007


I am trying to run the following script:


#!/usr/bin/python

import popen2

commandToRun = """scp scp_trial.py user at host:/targetDirectory"""
#commandToRun = "ls"
print commandToRun
p_out, p_in = popen2.popen4 (commandToRun)

theOut = p_out.readlines ()
print theOut


When I run this command with the "ls" command I see the output.
When I run this with the scp command I do not see the output of my
command -- however the file is successfully transfered.  How can I see
the output?

Thanks




More information about the Python-list mailing list