Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Location
    U.S.A
    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Through a windows command prompt? Can you not just run it through the Python shell or through the python command line prompt?
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    Regular Coder
    Join Date
    Apr 2007
    Location
    U.S.A
    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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/for...opic_id=453992
    Thanks,


    Joe

  • #4
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    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/window...-under-windows
    Last edited by Spookster; 07-03-2007 at 11:28 PM.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •