subprocess problem on Windows in IDLE and PythonWin

Discussion in 'Python' started by David S., Feb 16, 2005.

  1. David S.

    David S. Guest

    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.
    David S., Feb 16, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. stephan
    Replies:
    0
    Views:
    426
    stephan
    Jul 30, 2003
  2. Tuure Laurinolli

    IDLE; Pythonwin and windows network drives

    Tuure Laurinolli, Jul 1, 2004, in forum: Python
    Replies:
    3
    Views:
    376
    David Fraser
    Jul 1, 2004
  3. Tim Rice
    Replies:
    1
    Views:
    446
    Tom B.
    Aug 28, 2004
  4. Chris Munchenberg

    wxTheClipboard problem, IDLE vs PythonWin

    Chris Munchenberg, Oct 7, 2004, in forum: Python
    Replies:
    0
    Views:
    333
    Chris Munchenberg
    Oct 7, 2004
  5. W. eWatson
    Replies:
    15
    Views:
    600
    Steve Holden
    Feb 15, 2009
Loading...

Share This Page