Command line arguments on Vista

jmike at alum.mit.edu jmike at alum.mit.edu
Fri Jan 12 15:49:22 CET 2007


So I write this sript called printargs.py:

------
#!/usr/local/bin/python
import sys
print 'there are %d args' % len(sys.argv)
for arg in sys.argv:
    print 'arg: %s' % arg
------

and make it executable.  On pretty much every platform I can get my
hands on, when I run

     printargs.py booga -a wooga

I get this output:

     there are 4 args
     arg: printargs.py
     arg: booga
     arg: -a
arg: wooga

But on Windows Vista, when I run that command, I get

     there are 1 args
     arg: printargs.py

What's up with that?
   --JMike




More information about the Python-list mailing list