capturing stdout and stderr of system()

Vassilis Virvilis vasvir at
Fri May 26 19:34:35 CEST 2000


I would like to capture both the output of stdout and stderr of system()
in two distinct strings in a portable way. I can do it if I use fork()
instead of system() but I would like to maintain source compatibility
with win32 as much as possible.

I searched the FAQ and howtos and I looked at popen2 code but it uses
fork, so if anyone can  enlighten me I would be grateful.

I hope this is the right place for asking this kind of questions...


More information about the Python-list mailing list