[ python-Bugs-1736483 ] os.popen('yes | echo hello') stuck
SourceForge.net
noreply at sourceforge.net
Wed Jun 13 19:07:45 CEST 2007
Bugs item #1736483, was opened at 2007-06-13 09:41
Message generated for change (Comment added) made by ilgiz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1736483&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Eric (cpegeric)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.popen('yes | echo hello') stuck
Initial Comment:
after calling os.popen('yes | echo hello'), the process never returns.
----------------------------------------------------------------------
Comment By: Ilguiz Latypov (ilgiz)
Date: 2007-06-13 13:07
Message:
Logged In: YES
user_id=281701
Originator: NO
Could you try the same command from your shell?
I am guessing "yes" will write an error message about the broken pipe to
stderr.
$ python -c 'import sys, os; sys.stdout.write(os.popen("yes | echo
hello").read())'
yes: standard output: Broken pipe
yes: write error
hello
$ python -c 'import sys, os; sys.stdout.write(os.popen3("yes | echo
hello")[1].read())'
hello
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1736483&group_id=5470
More information about the Python-bugs-list
mailing list