[Python-Dev] subprocess.Popen: change default buffer size?

Victor Stinner victor.stinner at haypocalc.com
Mon Nov 24 02:37:59 CET 2008

subprocess.Popen is much SLOWER than os.popen() on Mac and Solaris.

The goal is to read the output of a command (through a pipe) as fast as 
possible. The problem is the pipe buffering (the reader file in the Python 

Today, subprocess.Popen() uses bufsize=0 by default. It should be 
bufsize=(-1): use the system default buffer size.

==> http://bugs.python.org/issue4194

Note: On Linux the performances between subprocess (unbuffered) and popen() 
(buffered) are the same, which is quite strange.


More information about the Python-Dev mailing list