simple question: $1, $2 in py ?

Diez B. Roggisch deets at nospam.web.de
Mon Sep 5 06:54:35 EDT 2005


> 
> As far as I understand there's no $1, $2... etc stuff right ?

Yes - but there is sys.argv

Try this


import this

print sys.argv


and invoke it as script with args. Make also sure to checkout modules 
optparse and getopt to deal with the options.

Diez



More information about the Python-list mailing list