View Single Post
Join Date: Jul 2008
Posts: 845
Reputation: Gribouillis has a spectacular aura about Gribouillis has a spectacular aura about Gribouillis has a spectacular aura about 
Solved Threads: 192
Gribouillis's Avatar
Gribouillis Gribouillis is online now Online
Practically a Posting Shark

Re: New to Python, help printing output of system calls

 
0
  #3
Aug 18th, 2008
It would be easier if we could see the python line which runs the system call.
A possible solution to your problem is to start the system call without waiting for it's completion, using subprocess.Popen (see http://docs.python.org/lib/node533.html). Then, once you have a child process running, print it's output with a loop, like this
  1. child = Popen(...)
  2. for line in child.stdout:
  3. print line
Reply With Quote