[issue3905] subprocess failing in GUI applications on Windows

Terry J. Reedy report at bugs.python.org
Wed Jun 11 02:15:29 CEST 2014


Terry J. Reedy added the comment:

Mark, you did not specify which of the variations you tried ;-) I reproduce as I said in my last message.

C:\Programs\Python34>pythonw -m idlelib

Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [
>>> import subprocess
>>> p = subprocess.Popen(["python", "-c", "print(32)"], stdin=None,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Traceback (most recent call last):
...
    _winapi.DUPLICATE_SAME_ACCESS)
OSError: [WinError 6] The handle is invalid

Change startup command from pythonw to python, no error, and it runs.
>>> p.communicate()
(b'32\r\n', b'')

----------
stage: test needed -> needs patch
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3905>
_______________________________________


More information about the Python-bugs-list mailing list