New submission from Patrick Mézard:
Let child.py be:
"""
import sys
sys.stdout.write('1:stdout\n')
sys.stdout.flush()
sys.stderr.write('2:stderr\n')
sys.stderr.flush()
sys.stdout.write('3:stdout\n')
sys.stdout.flush()
"""
and parent.py:
"""
import os
cmd = 'python child.py'
for l in os.popen(cmd):
print l,
"""
Then running it:
"""
>python parent.py
1:stdout
>python
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
"""
I would have expected at least:
"""
1:stdout
3:stdout
"""
to be output, which actually happens if the stderr is nullified like
"python child.py 2>nul" in parent.py call.
Am I wrong ?
--
components: Windows
messages: 56991
nosy: pmezard
severity: normal
status: open
title: popen spawned process may not write to stdout under windows
type: behavior
versions: Python 2.5
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1366>
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com