I cannot access python and panda via command line.

I have been using python and panda3d for about six months and i have been able to work with panda 3d quite smoothly.I had reformated my computer 2 days ago.I had reinstalled python and panda3d on my computer plus all the other files i originally had on.
When i now try to run an application that i had made in panda3d
with this command

ppython game.py

or even a simple python application with this command

python simple.py

i get this error

" ‘Python’ is not recognized as an internal or external command,operable program or batch file "

I never had this probelm before and only seemed to happened right after i reformated the computer,i had installed python and panda3d as i had done before so i really dont know what the problem could be

david moussa

Your PATH isn’t set right, the system cannot find python.
(Are you on Win or Lin? I assume you are on Windows.)
There are two ways to solve this:

  1. Call python using this command instead:
    c:\panda3d-1.3.2\python\ppython.exe yourfile.py
  2. Add python to your path. I don’t know how to do that exactly, someone else can explain that better than me. I believe I saw a document at this website about that lately, but I’m not sure. On Linux you would do something like “export PATH=$PATH:/usr/local/panda3d/bin” or so. But on Windows, this is different in different versions. What version are you using? Windows XP? 2000?

Im using windows XP home edition

I tried typing in the command you suggested and it still did not work

Did you install Panda at the default location ?

What pro-rsoft meant was ‘path_to_panda\python\ppython.exe path_to_your_file\yourfile.exe’

To set the PATH in Windows XP:

From the desktop, right click My Computer and click properties.

In the System Properties window, click on the Advanced tab.

In the Advanced section, click the Environment Variables button.

Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. As you can see the directories are separated by semicolons. So add the path to your ppython.exe (probably something like c:\panda3d-1.3.2\python) to the paths listed there.

i installed panda3d at its defualt location.

when i typed this in ‘path_to_panda\python\ppython.exe
it opened python in the DOS window which did not allow me to enter in
Im quite confused with how im meant to use these

i always used to install panda3d and python in their default locations and i was always able to run them from the command line.

I used to typed this command in

cd C:\panda3d which chooses the directory

ppython game.py which runs the file.

at the present moment i cant do these any more without getting an error

i found the problem, i had renamed the folder to panda3d which seemed to stuff evreything up,i reinstalled it and now it works
thanks for all your help