Message105088
After using subprocess.Popen(...).communicate(), the session hangs.
c:\>python31
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from subprocess import Popen, PIPE
>>> Popen(["echo","Hello!"], stdout=PIPE).communicate()[0]
b'Hello!\n'
>>>
At this point, the session stops responding to keyboard input.
=========================================
MORE DETAILS:
Neither Ctrl-C, Ctrl-Z, nor Ctrl-D will break out of it, but Ctrl-Break does break out of it.
The task manager shows no CPU activity for the process.
I've seen problem with Python v3.1.2 and v2.6.1 on Windows 7.
It works fine under Linux:
$ python3.1
Python 3.1 (r31:73572, Mar 22 2010, 14:57:00)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from subprocess import Popen, PIPE
>>> Popen(["echo","Hello!"], stdout=PIPE).communicate()[0]
b'Hello!\n'
>>> print("No problems under Linux")
No problems under Linux
>>>
Is this bug type "crash" or "behavior"? I went with the former, since it ends the usable Python session. |
|
Date |
User |
Action |
Args |
2010-05-05 21:45:07 | Alex Quinn | set | recipients:
+ Alex Quinn |
2010-05-05 21:45:06 | Alex Quinn | set | messageid: <1273095906.37.0.582736332431.issue8631@psf.upfronthosting.co.za> |
2010-05-05 21:45:04 | Alex Quinn | link | issue8631 messages |
2010-05-05 21:45:03 | Alex Quinn | create | |
|