[Tutor] How to run a Python program under Windows.
bgailer at gmail.com
Tue Jul 29 18:13:23 CEST 2008
Morgan Thorpe wrote:
> I'm am very new to the whole programming sence.
> I am trying to catch on but as soon as i want to write a program i've
> been told to use like 'notepad' in windows XP and save it as a .py file
> i have gotten this far. Am i wrong so far?
No. There are also IDEs such as IDLE and Python For Windows that make
development easier (for many of us).
> If i am right why is it that i can't run it in anyway besides it
> opening in 'notepad' i've tried opening with Python but it doesn't work.
Now comes the art of asking good (effective) questions.
1 - provide a subject (as I did)
2 - tell us what you tried (opening with Python is too vague) Example
"At the command prompt I entered "c:\\python25\\python test.py"
3 - tell us what happened. Example "I got the message "'python' is not
recognized as an internal or external command, operable program or batch
4 - reply to the list.
Those are just examples. What did you do "open with Python" I'll bet you
picked that from the context menu. If that is the case did you see a dos
window flash ever so briefly? Try adding raw_input("press any key to
exit") at the end of your program. Of course that will work only if
there are no errors in the program.
Best way for now is from the command prompt (like "c:\\python25\\python
919-636-4239 Chapel Hill, NC
More information about the Tutor