Re: Hierarchical commnd line parsing / help texts

2011-09-28 Thread Michele Simionato
plac is based on argparser and it is intended to be much easier to use. See http://plac.googlecode.com/hg/doc/plac.html Here is an example of usage. $ cat vcs.py class VCS(object): "A fictitious version control tool" commands = ['checkout', 'commit'] def checkout(self, url): r

Re: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Ian Kelly
On Mon, Sep 26, 2011 at 2:11 PM, Tim Chase wrote: > On 09/26/11 13:57, Prasad, Ramit wrote: >>> >>> It seems it's time to start reading about argparse >> >> FYI, it only appears on Python 2.7+ > > However I believe it can be uneventfully copied and run under several > versions earlier (likely back

Re: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Tim Chase
On 09/26/11 13:57, Prasad, Ramit wrote: It seems it's time to start reading about argparse FYI, it only appears on Python 2.7+ However I believe it can be uneventfully copied and run under several versions earlier (likely back to 2.5, perhaps to 2.4 -- I no longer have 2.4 at my fingertips t

Re: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Paul Rudin
"Prasad, Ramit" writes: > This email is confidential... Probably a bad idea to post it to a world readable mailing list then :) -- http://mail.python.org/mailman/listinfo/python-list

RE: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Prasad, Ramit
> It seems it's time to start reading about argparse FYI, it only appears on Python 2.7+ Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 5423 This email is confidential and subject to important disclaimers

Re: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Gelonida N
On 09/26/2011 11:10 AM, Chris Rebert wrote: > On Mon, Sep 26, 2011 at 1:55 AM, Gelonida N 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

Re: Hierarchical commnd line parsing / help texts

2011-09-26 Thread Chris Rebert
On Mon, Sep 26, 2011 at 1:55 AM, Gelonida N 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