Hi,
i have a program that have to execute linux commands. I do it like this:
retcode = Popen(["xterm", "-e", command],stdin=PIPE, stdout=PIPE,
stderr=PIPE)
I have to use xterm because some commands need further input from the user
after they are executed.
But when i use xterm i can't get the returncode or the errormessage from a
command:
print retcode.returncode # always 0
print retcode.stderr.read() # always empty
print retcode.stdout.read() # always empty
The same code works without xterm. As i understand it, if i use xterm the
retcode refers to the xterm window (process).
But is there a way i can get the returncode and errormessage of the
command i sent to xterm ?
Thanks for any answers
AmFreak
--
http://mail.python.org/mailman/listinfo/python-list