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 | pmezard |
|---|---|
| Recipients | pmezard |
| Date | 2007年10月31日.09:59:42 |
| SpamBayes Score | 0.20603433 |
| Marked as misclassified | No |
| Message-id | <1193824783.73.0.865697244253.issue1366@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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 ? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年10月31日 09:59:43 | pmezard | set | spambayes_score: 0.206034 -> 0.20603433 recipients: + pmezard |
| 2007年10月31日 09:59:43 | pmezard | set | spambayes_score: 0.206034 -> 0.206034 messageid: <1193824783.73.0.865697244253.issue1366@psf.upfronthosting.co.za> |
| 2007年10月31日 09:59:43 | pmezard | link | issue1366 messages |
| 2007年10月31日 09:59:42 | pmezard | create | |