popen4

billie mlist at fastwebnet.it
Sun Oct 16 17:13:13 EDT 2005


Hi all. I'm trying to execute system commands and capture the output by 
using popen4:

stdout example:
>>>exec_cmd = popen2.popen4("echo hello!")
>>>output = exec_cmd[0].read()
hello

stderr example:
>>>exec_cmd = popen2.popen4("echobv hello!")
>>>output = exec_cmd[0].read()
Unrecognized command

The problem occurs when I try to execute interactive commands like ftp, 
python intepreter etc...
In this case the program crashes without even giving an error.
Suggestions?

Regards





More information about the Python-list mailing list