Issue1126208
Created on 2005-02-17 20:33 by kbk, last changed 2007-01-22 19:30 by astrand.
| Messages (3) | |||
|---|---|---|---|
| msg24343 - (view) | Author: Kurt B. Kaiser (kbk) | Date: 2005-02-17 20:33 | |
=====================
From: David S. <davidschein <at> alumni.tufts.edu>
Subject: subprocess problem on Windows in IDLE and PythonWin
Newsgroups: gmane.comp.python.general
Date: Wed, 16 Feb 2005 02:05:24 +0000
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.
===========
I (KBK) can duplicate this on W2K using 2.4. If I run IDLE with the -n
switch (no subprocess) the error doesn't occur.
Unfortunately, I can't debug it because I don't have the necessary
tools on Windows. It appears that the problem is in
_subprocess.c:sp_DuplicateHandle(), likely that PyArg_ParseTuple()
is OK but the failure occurs in the call to DuplicateHandle().
All the args to sp_DuplicateHandle() seem to be the right type.
DUPLICATE_SAME_ACCESS is an integer, value 2
To find out what's going on, it would seem necessary to attach a
windows debugger to IDLE's subprocess (not the IDLE GUI). Let
me know if I can help.
|
|||
| msg24344 - (view) | Author: Steven Bethard (bethard) | Date: 2005-09-26 14:51 | |
Logged In: YES user_id=945502 I believe this is related to 1124861 (if it's not a duplicate of it) |
|||
| msg24345 - (view) | Author: Peter Åstrand (astrand) | Date: 2007-01-22 19:30 | |
Duplicate of 1124861. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2005-02-17 20:33:16 | kbk | create | |