Possible Duplicate:
How to make python scripts executable on Windows?
Set up Python on Windows to not type python in cmd
I would like to be able to execute a Python script with one command (i.e. filename -p parameter1
) without having to type python filename.py -p parameter1
. I tried adding the Windows shebang line; however, when I execute .\filename.py in the command line, it opens a new shell altogether just long enough for the output to flash on the screen and then the window closes. Is there any way to run that script and output to the current console?
Additionally, is there anything I can do to get rid of the need for the .py extension and make it callable from any directory?