Hierarchical commnd line parsing / help texts
Chris Rebert
clp2 at rebertia.com
Mon Sep 26 05:10:17 EDT 2011
More information about the Python-list mailing list
Mon Sep 26 05:10:17 EDT 2011
- Previous message (by thread): Hierarchical commnd line parsing / help texts
- Next message (by thread): Hierarchical commnd line parsing / help texts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Sep 26, 2011 at 1:55 AM, Gelonida N <gelonida at gmail.com> wrote: > Hi, > > So far I used optparse.OptionParser for parsing command line arguments > for my python scripts. So far I was happy, with a one level approach, > where I get only one help text > > Now I'd like to create a slightly different python script and wondered > which approach / module might be best for implementing the parsing and > generation of help texts. <snip> > then if I typed ./sh.py <command> -h > I'd like to get the helptext for the specified command. http://docs.python.org/library/argparse.html It is capable of handling sub-commands and the display of subcommand-specific help text. Cheers, Chris
- Previous message (by thread): Hierarchical commnd line parsing / help texts
- Next message (by thread): Hierarchical commnd line parsing / help texts
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list