programme call with popen
Christian Schleippmann
schleipp at transaction.de
Wed Aug 29 04:46:26 EDT 2001
Hello everybody,
I use the popen2 function to initialize a variable with the output of
a programme. If I use the interactive mode, python seems to start
another process - it appears the programme output, which is put on
strerr.
WHY does this happen?
The variable is initialized properly, at least I can call it with the
read() method....
Here is the code:
>>>import popen2,string
>>>fin, fout = popen2.popen2("[programmecall]")
#HERE HAPPENS SOMETHING I DO NOT UNDERSTAND, python "waits"
>>>fin.read() #this works fine again
Is there a better way by using popen4? How to do that then?
Thanks
Christian
More information about the Python-list
mailing list