output of shell command

Mark Hammond MarkH at ActiveState.com
Wed Feb 28 05:21:30 EST 2001


Steve Holden wrote:

> "Mark Hadfield" <m.hadfield at niwa.cri.nz> wrote in message
> news:983312067.173004 at clam-ext...
> 
>> "Ben Hutchings" <ben.hutchings at roundpoint.com> wrote in message
>> news:u3dczkcpk.fsf at roundpoint.com...>
>> 
>>  > os.popen("dir").readlines() works for me in PythonWin 2.0 #8 on
>> 
>>> Windows 2000 SP1, but I would not be surprised to find that it fails
>>> to work on Windows 98, though - there are large differences between
>>> the command interpreters and pipe implementations in different
>>> versions of Windows.  For that matter, the output format of dir may
>>> differ too.
>> 
> But this still doesn't explain the difference between the vanilla
> interpreter result and PythonWin's attempt.

Sorry, I missed the start of this thread.

There us a bug in Python 2.0 and popen.  It still exists to some extent in 2.1, but the error given is much more reasonable.

The work-around is to copy w9xpopen.exe to the same dir as Pythonwin.exe

Mark.




More information about the Python-list mailing list