Problem with popen with win98 (python 2.0)

Mike Callahan mcalla at home.com
Wed May 9 16:12:42 EDT 2001


I found out what the problem was, sort of... popen() works using plain
Python 2.0 command line and IDLE shell. I get the error message in Pythonwin
shell. I guess that means that the problem lies with Pythonwin. I guess I
will just ignore the error message since the command will work when I am
running my program outside of Pythonwin. However, I am curious why popen()
does not work under Pythonwin shell. I guess I can live with it, I love
Pythonwin for Tkinter development.

I checked and notepad.exe on my Win98 system is under /windows.

Thanks for responding, Jim.

Mike

"jim.vickroy" <jim.vickroy at noaa.gov> wrote in message
news:3AF9494E.DD1D1B47 at noaa.gov...
> Hello Mike,
>
> import os
> os.popen ('notepad') # works on my win2k system
>
> I did note that "notepad" is in a "system32" folder.  Do either of the
> commands, you tried, work from a DOS command line?
>
>
> Mike Callahan wrote:
>
> > What am I doing wrong?
> >
> > import os
> > >>> os.popen('notepad')
> > Traceback (innermost last):
> >   File "<interactive input>", line 1, in ?
> > WindowsError: [Errno 2] The system cannot find the file specified
> > >>> os.popen('c:\\windows\\notepad.exe')
> > Traceback (innermost last):
> >   File "<interactive input>", line 1, in ?
> > WindowsError: [Errno 2] The system cannot find the file specified
> > >>>
> >
> > Thanks for any help,
> >
> > Mike
>





More information about the Python-list mailing list