os.popen() and (IDLE, PythonWin) ?

M.-A. Lemburg mal at lemburg.com
Fri Oct 29 13:44:37 EDT 1999


[os.popen('ver') fails under IDLE and PythonWin, yet works under "normal"
 Python]

Karl Putland wrote:
> 
> Good call it is breaking under IDLE and Pythonwin.  It works under vanilla
> Python though.
> 
> ****************************Pythonwin************************************
> PythonWin 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> Portions Copyright 1994-1999 Mark Hammond (MHammond at skippinet.com.au)
> >>> import platform
> >>> platform.platform()
> 'win32-4.0-1381-SP4'
> >>>
> 
> ****************************Vanila Python********************************
> Microsoft(R) Windows NT(TM)
> (C) Copyright 1985-1996 Microsoft Corp.
> 
> C:\>python
> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import os
> >>> os.popen('ver')
> <open file 'ver', mode 'r' at 7f6f90>
> >>> os.popen('ver').read()
> '\012Windows NT Version 4.0  \012'
> >>> import platform
> >>> platform.platform()
> 'Windows-NT-4.0-1381-SP4'
> >>>

Any idea how to get this working with PythonWin and IDLE ? I know
there are some issues with pipes on Windows, but why should PythonWin
and IDLE fail when vanilla Python works ?

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                    63 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/






More information about the Python-list mailing list