subprocess problem on Windows in IDLE and PythonWin

David S. davidschein at alumni.tufts.edu
Tue Feb 15 21:05:24 EST 2005


Python 2.4 on Windows XP
In the python command-line the following works fine:

>>> from subprocess import *
>>> p = Popen('dir', stdout=PIPE)

>From within IDLE or PythonWin I get the following exception:

Traceback (most recent call last):
  File "<pyshell#13>", line 1, in -toplevel-
    p = Popen('dir', stdout=PIPE)
  File "c:\python24\lib\subprocess.py", line 545, in __init__
    (p2cread, p2cwrite,
  File "c:\python24\lib\subprocess.py", line 605, in _get_handles
    p2cread = self._make_inheritable(p2cread)
  File "c:\python24\lib\subprocess.py", line 646, in _make_inheritable
    DUPLICATE_SAME_ACCESS)
TypeError: an integer is required

Note it works fine on Linux also.  I tested it with 
>>> p = Popen('ls', stdout=PIPE)
... and had no trouble.




More information about the Python-list mailing list