Skip Montanaro <[EMAIL PROTECTED]> added the comment:

Using a nonzero bufsize parameter makes all the difference in the world:

  Using the default (bufsize=0 ==> unbuffered):

    % python popentest.py
    time with os.popen :  0.035032
    time with subprocess.Popen :  1.496455

  Creating the Popen object with bufsize=8192:

    % python popentest.py
    time with os.popen :  0.034642
    time with subprocess.Popen :  0.041376

  Creating the Popen object with bufsize=1 (==> line buffered):

    % python popentest.py
    time with os.popen :  0.034658
    time with subprocess.Popen :  0.04211

Maybe the default for that parameter shouldn't be zero?

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

Reply via email to