473,386 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

subprocess problem on Windows in IDLE and PythonWin

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.

Jul 18 '05 #1
0 1204

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rami A. Kishek | last post by:
Please help! Very strange installation problem. First, let me say I successfully installed and use Python 2.2.3 and 2.3 from the EXE binaries on a win ME machine. That machine previously had...
10
by: Kylotan | last post by:
Is there a practical way to use Pychecker in Windows? It doesn't work under IDLE. (In fact, it seems to end up breaking everything, and every subsequent statement and expression I execute gets...
3
by: Tuure Laurinolli | last post by:
Some time ago I was playing with the idea of using an actual IDE to write my python code. I first played with IDLE, but noticed that it was kind of limited and for some reason it worked extremely...
5
by: StepH | last post by:
Hi, I'm new to Python. I'm working under XP, and I've alot of prob. (not with the langage itself, but with the tools): I've install Pyhton 2.4 in C:\Python24, using the .msi windows...
1
by: Bo Peng | last post by:
Dear list, I am using rpy, a python module to control statistical package R from python. Running the following commands >>> from rpy import * >>> r.plot(0) will pass command 'plot' to R...
3
by: madpython | last post by:
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 >>>...
20
by: W. Watson | last post by:
I downloaded python-2.5.msi and installed it. I believe its editor is IDE. I understand there's a Win editor called pythonwin. I believe it's in the download pywin32-210.win32-py2.5.exe, but I'm...
2
by: Llessur16 | last post by:
I recently installed Python 2.5 for windows XP. It seemed to be working great. I was writing a simple program, and had tested it a couple times. When I was nearly done I tried to run it, and a box...
4
by: sterling | last post by:
I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.