[Tutor] Getting Started; Syntax Error; Bad Command or File Na me
alan.gauld@bt.com
alan.gauld@bt.com
Thu, 29 Nov 2001 11:04:12 -0000
> Yes, this means python isn't in the PATH. Please refer to what other
> people recommended 'cause I haven't used windows in quite
> some time
Edit AUTOEXEC.BAT.
Add a line:
PATH=%PATH%;C:\Python21 (or whatever the real path to python.exe is!)
> Although if I remember right, it's easier to simply associate python
> with .py extension (it's done somewhere in options in explorer), and
> Does anyone remember how to associate python with .py extension?
You should really set PATH too IMHO so that you can launch python from
any command line anywhere.
To assoiciate files either:
Shift right-click on a .py file and choose openwith
Find python.exe and then check the box that says
'always use this program' or something like it.
OR
Go to Windows Explorer and Open View||FolderOptions...
In the dialog select the FileTypes tab andif .py is a registered
type ensure it points at python.exe (and check .pyw points at
pythonw.exe while at it!)
If not create the two new types and then associate them with
their appropriate programs.
The installer should have done all of this except setting
the PATH. You can quickly tell by looking at the icon next
to a .py file. If it shows a snake you are already set up
correctly. In which case just double clkick the file to
run it. Add the raw_input... line if necessary.
Alan G.