This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skip.montanaro
Recipients LambertDW, sameerd, skip.montanaro, wplappert
Date 2008-10-25.13:50:31
SpamBayes Score 6.7641944e-05
Marked as misclassified No
Message-id <18690.15113.458679.682697@montanaro-dyndns-org.local>
In-reply-to <18690.3034.472764.227788@montanaro-dyndns-org.local>
Content
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
History
Date User Action Args
2008-10-25 13:50:33skip.montanarosetrecipients: + skip.montanaro, LambertDW, wplappert, sameerd
2008-10-25 13:50:31skip.montanarolinkissue4194 messages
2008-10-25 13:50:31skip.montanarocreate