Message75209
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 |
|
| Date |
User |
Action |
Args |
| 2008-10-25 13:50:33 | skip.montanaro | set | recipients:
+ skip.montanaro, LambertDW, wplappert, sameerd |
| 2008-10-25 13:50:31 | skip.montanaro | link | issue4194 messages |
| 2008-10-25 13:50:31 | skip.montanaro | create | |
|