capture the output

ciccio at unical.it ciccio at unical.it
Wed Jul 19 12:18:15 EDT 2006



On 7/19/06, ciccio at unical.it <ciccio at unical.it> wrote:


Dear all,

I'm executing a program by os.spawnv() function. However the program print out
several things. I would to capture this output, but I don't know how.
Could you give me a suggestion?

Thank you 

Ernesto

Hi Ernesto

could you use popen2 or are you bound to os.spawnv?

- Unfortunately I cannot use functions calling the cmd.exe. My operating system
is windows 
 
from os import popen2
dummy, stdout = popen2("prog")
stdout.readlines

and why not put this into a thread? 

- Because I don't know how...

Ciao
Roberto 



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

--
http://mail.python.org/mailman/listinfo/python-list



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/




More information about the Python-list mailing list