Fetching the stdout & stderr as it flows from a unix command.

Hans Deragon hans at deragon.biz
Fri Jun 4 15:13:10 EDT 2004


Greetings.


I am performing:

  commands.getstatusoutput("rsync <params>");

rsync takes a long time and prints out a steady stream of lines
showing which file it is currently working on.

Unfortunatly, the commands.getstatusoutput() fetchs everything and
there is no way to ask it to copy the output of the command to
stdout/stderr.  Thus when rsync takes an hour, I have no clue where it
is at.

Anybody has a suggestion how to let stdout/stderr print out on the
console when calling a unix command?


Best regards,
Hans Deragon
--
Consultant en informatique/Software Consultant
Deragon Informatique inc.     Open source:
http://www.deragon.biz        http://facil.qc.ca (Promotion du libre)
mailto://hans@deragon.biz     http://autopoweroff.sourceforge.net
(Logiciel)



More information about the Python-list mailing list