subprocess.Popen on Windows

3c273 nospam at nospam.com
Fri Jun 23 17:12:00 EDT 2006


"madpython" <madpython at gmail.com> wrote in message
news:1151094433.181414.164410 at g10g2000cwb.googlegroups.com...
> playing with subprocess.Popen on Windows I stumbled into the following
> problem:
> Python 2.4.3 (#69, Mar 29 2006, 17:35:34)
>
> IDLE 1.1.3
>
> >>> import subprocess
> >>> p1=subprocess.Popen("c:\\asd.bat") #works OK
> >>> p2=subprocess.Popen("c:\\asd.bat",stdout=subprocess.PIPE)
>
> Traceback (most recent call last):
>   File "<pyshell#2>", line 1, in -toplevel-
>     p2=subprocess.Popen("c:\\asd.bat",stdout=subprocess.PIPE)
>   File "C:\Python24\lib\subprocess.py", line 533, in __init__
>     (p2cread, p2cwrite,
>   File "C:\Python24\lib\subprocess.py", line 593, in _get_handles
>     p2cread = self._make_inheritable(p2cread)
>   File "C:\Python24\lib\subprocess.py", line 634, in _make_inheritable
>     DUPLICATE_SAME_ACCESS)
> TypeError: an integer is required
> >>>
> What do I do wrongly?
>
I get the same thing. This only happens when using IDLE. From a command
prompt, everthing works as expected. Hopefully somebody else will know why.
Louis





More information about the Python-list mailing list