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, bgh, georg.brandl, giampaolo.rodola, gregory.p.smith, sameerd, skip.montanaro, vstinner, wplappert
Date 2008-11-24.15:11:55
SpamBayes Score 6.4374167e-10
Marked as misclassified No
Message-id <18730.50224.580059.974146@montanaro-dyndns-org.local>
In-reply-to <1227488357.87.0.501494241414.issue4194@psf.upfronthosting.co.za>
Content
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
History
Date User Action Args
2008-11-24 15:11:57skip.montanarosetrecipients: + skip.montanaro, georg.brandl, gregory.p.smith, vstinner, giampaolo.rodola, LambertDW, wplappert, sameerd, bgh
2008-11-24 15:11:56skip.montanarolinkissue4194 messages
2008-11-24 15:11:55skip.montanarocreate