[Python-3000] os.popen versus subprocess.Popen

"Martin v. Löwis" martin at v.loewis.de
Mon Apr 21 23:44:38 CEST 2008


> IMO os.popen() is wrong here.

Should os.popen go away entirely?

Apparently, it does two things:
a) redefine close to block until the child process terminated,
and
b) wrap stdout/stdout with a TextIOWrapper

If there is an actual need to specify an encoding when communicating
with the subprocess, I'd rather make that parameter to Popen itself.

Regards,
Martin


More information about the Python-3000 mailing list