Skip Montanaro <[EMAIL PROTECTED]> added the comment: Victor> About Python3, os.popen() is more than two times faster (0.20 Victor> sec vs 0.50 sec) than subprocess.Popen()! It's amazing because Victor> popen() opens the standard output as unicode file whereas Victor> Popen() creates a binary file! Another funny thing: os.popen() Victor> calls subprocess.Popen() :-) The difference is just this Victor> instruction: Victor> stdout = io.TextIOWrapper(stdout)
This is a known issue. The default for bufsize in os.popen is -1 (fully buffered? line buffered?). The default for bufsize in subprocess.Popen is 0 (unbuffered). I think it should have been changed but was voted down. I think the best you can do at this point is document the change, perhaps in the "Replacing os.popen" section. Skip _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4194> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com