Possible Duplicate:
Set up Python on Windows to not type python in cmd
When I use python on Linux, or even Mac OS from command line, I take advantage of the shebang and run some of my scripts directly, like so: ./myScript.py
. I do need to give this script executable permissions, but that is all.
Now, I just installed Python 3.1.2 on Windows 7, and I want to be able to do the same from command line. What additional steps do I need to follow?
.py
files with the interpreter in the registry. You might have to manually add the extension to the PATHEXT environment variable. - martineauPATHEXT
is needed only if one wants to run scripts without using extension. - Piotr DobrogostmyScript.py
) before asking this question? - Piotr DobrogostPATHEXT
has had.py
added to it and what that does, the important point is that in general one doesn't have to do anything after installing Python to be able to run scripts from the command-line (or by double-right-clicking on them. For that reason, I don't understand why the OP accepted the answer that they did. - martineau