[Tutor] How do I run a program?
alan.gauld@bt.com
alan.gauld@bt.com
Tue, 18 Jan 2000 17:17:50 -0000
> Hello group! I am using Win98. I downloaded Python 1.5 and it
> runs in an MSDOS prompt. My problem is that when I write a
> program in Notepad and save it I can't get it to run.
You should be able to double click on it in explorer and
the installer should have set up the file associations for you.
In fact the file(ending in .py) should have a little green
snake icon...
If for some reason its not set up then you will have to
use the view|options dialog in exporer to set the association
manually - do it for .py and .pyc
Finally if you are creating modules and storing them in a
common place you need to sert the PYTHONPATH environment
variable in Autoexec.bat, otherwise when you try to import
them from elsewhere Python won't know where to look.
Last resort, start a DOS box and at the C:> prompt rtype:
C:> python <path...>\foo.py
where you fill in the full path to your python script.
Alan G.