Helpful Information
 
 
Category: Python
run program in command prompt

does anybody know how I can run a program in the directory
C:\Python25\mypythonprograms\pygame-demo\pytest.py
through the command prompt?

Thanks,


Joe

Through a windows command prompt? Can you not just run it through the Python shell or through the python command line prompt?

sorry long story, but I have pygame and it crashes my IDE when I go to run it, so someone said to try it from the command prompt to see if its my IDE and see if I can find out what is wrong.
http://www.gamedev.net/community/forums/topic.asp?topic_id=453992
Thanks,


Joe

Oh ok. Well then just open a command prompt and go to where you installed the python executable at. Mine is installed at C:\Python24\python.exe and then just type "python filename.py" assuming you have the file in the same directory as the python executable otherwise you will need to give the full path the file or set up some environment variables to let it know where to find your python script files.

Just like it says in the Python FAQ's
http://www.python.org/doc/faq/windows/#how-do-i-run-a-python-program-under-windows










privacy (GDPR)