On Tue, 7 Sep 2010 02:08:27 am Hugo Arts wrote: > sys.argv is a list of all arguments from the command line. However, > you'll rarely deal with it directly, there's various modules that > deal with handling arguments. I believe the current one is argparse: > http://docs.python.org/library/argparse.html#module-argparse
In my experience, getopt is a gentler introduction to argument parsing, because it does much less :) optparse is another good one. All three are available up to Python 2.7, and possibly in 3.1 as well, I haven't checked. -- Steven D'Aprano _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor