(Advanced users: instead of first.py, you could write out first.py's full path of C:\Documents and Settings\Gregg\Desktop\pyscripts\first.py) Then try calling it like this (assuming Python2.6, installed in the usual location): Then python (the interpreter program that can translate Python into 'computer instructions') isn't on your path (see Putting Python in Your Path below). > cd C:\Documents and Settings\Gregg\Desktop\pyscripts Navigate to where your python file is, using the commands 'cd' (change directory) and 'dir' (to show files in the directory, to verify your head). Open a prompt (a Windows 'cmd' shell that is a text interface into the computer): Lets call it 'first.py' in some folder, like "pyscripts" that you make on your Desktop. Save your python code file somewhere, using "Save" or "Save as" in your editor. We're working with Python novices, and had to help a few through exactly what you're asking! ![]() I'm very glad you asked! I was just working on explaining this very thing in our wikibook (which is obviously incomplete).
0 Comments
Leave a Reply. |