How to do os.popen with write and read at the same time?

Erno Kuusela erno at iki.fi
Tue Mar 14 08:28:42 CET 2000


hello,

>>>>> "Benyang" == Benyang Tang <btang at pacific.jpl.nasa.gov> writes:

    Benyang> How do I access stdin and stdout in python?  os.popen
    Benyang> accepts either 'w' or 'r' mode, but not both at the same
    Benyang> time.

you can use the popen2 module.

  -- erno

PS. This is covered in the faq (http://www.python.org/doc/FAQ.html#4.30).



More information about the Python-list mailing list