Using command line args on Windows

Duncan Booth duncan.booth at invalid.invalid
Thu Oct 6 08:43:43 EDT 2005


Fredrik Lundh wrote:

>> I'm stuck on a Windows machine today and would love to fully play
>> with and test a simple python script.  I want to be able to type
>> "python myscript myarg" somewhere.  Is there anything out there to
>> help me? 
> 
> footnote: if you'd prefer to type "myscript myarg" instead, you might
> want to check out this tool:
> 
>     http://effbot.org/zone/exemaker.htm

or even just do:

    SET PATHEXT=.py;%PATHEXT%

and then "myscript myarg" will work for all scripts on your path without 
compiling (if you don't set PATHEXT then "myscript.py myarg" will still 
work, and tab completion means you don't generally need to type the .py for 
scripts in the current directory). 



More information about the Python-list mailing list