Bugs item #1126208, was opened at 2005-02-17 21:33 Message generated for change (Comment added) made by astrand You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1126208&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: None >Status: Closed >Resolution: Duplicate Priority: 5 Private: No Submitted By: Kurt B. Kaiser (kbk) Assigned to: Peter Åstrand (astrand) Summary: subprocess.py Errors with IDLE Initial Comment: ===================== 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. ---------------------------------------------------------------------- >Comment By: Peter Åstrand (astrand) Date: 2007-01-22 20:30 Message: Logged In: YES user_id=344921 Originator: NO Duplicate of 1124861. ---------------------------------------------------------------------- Comment By: Steven Bethard (bediviere) Date: 2005-09-26 16:51 Message: Logged In: YES user_id=945502 I believe this is related to 1124861 (if it's not a duplicate of it) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1126208&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com