[Tutor] Arguments from the command line
augdawg09 at gmail.com
Tue Sep 7 01:46:06 CEST 2010
Alrighty! Thanks, everyone!
On Mon, Sep 6, 2010 at 6:48 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> 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 at python.org
> To unsubscribe or change subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor