Re: Ideas for a module to process command line arguments

2011-02-06 Thread Anjum Naseer
You may be interested in a little Python module I wrote to make handling of command line arguments even easier (open source and free to use) - http://freshmeat.net/projects/commando > On Tuesday, January 11, 2011 12:18 AM Sohail wrote: > Hey, every body has their own favorite method/ways to pro

Re: Ideas for a module to process command line arguments

2011-01-13 Thread Michele Simionato
On Jan 12, 6:09 pm, Alice Bevan–McGregor wrote: > entirely sure what you mean by 'smart' options.  If your'e referring to > using a single hyphen and a list of characters to represent a long > option (which, to the rest of the world, use two leading hyphens) then > that's pretty weird.  ;) > > One

Re: Ideas for a module to process command line arguments

2011-01-12 Thread Alice Bevan–McGregor
On 2011-01-11 21:41:24 -0800, Michele Simionato said: Originally plac too was able to recognize flags automatically by looking at the default value (if the default value is a boolean then the option is a flag); however I removed that functionality because I wanted to be able to differentiate b

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Michele Simionato
On Jan 11, 6:57 pm, Mike wrote: > On Jan 11, 11:26 am, Michele Simionato > wrote: > > In that case easy_install/pip/whatever will install the dependency > > automatically (who is installing > > dependencies by hand nowadays?). > > I do. Is this bad? :} You are simply spending more time than need

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Michele Simionato
On Jan 11, 4:06 pm, Alice Bevan–McGregor wrote: > After looking into it, Plac's default help display isn't very helpful; > you need to massage your application a fair amount before generating > nice, complete-looking argument lists and such.  For example: > >         def main(verbose: ('prints mor

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Mike
On Jan 11, 11:26 am, Michele Simionato wrote: > > In that case easy_install/pip/whatever will install the dependency > automatically (who is installing > dependencies by hand nowadays?). More seriously I thought being based I do. Is this bad? :} -- http://mail.python.org/mailman/listinfo/python-

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Michele Simionato
On Jan 11, 5:22 pm, Jean-Michel Pichavant wrote: > Michele Simionato wrote: > > On Jan 11, 4:06 pm, Alice Bevan McGregor wrote: > > >> Plac appears (from the documentation) to be written on top of argparse. > >>  :( > > > And the problem with that being what? > > ... not available to python 2.5 /

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Jean-Michel Pichavant
Michele Simionato wrote: On Jan 11, 4:06 pm, Alice Bevan–McGregor wrote: Plac appears (from the documentation) to be written on top of argparse. :( And the problem with that being what? ... not available to python 2.5 / 2.6 users :) JM -- http://mail.python.org/mailman/listinfo/

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Michele Simionato
On Jan 11, 4:06 pm, Alice Bevan–McGregor wrote: > Plac appears (from the documentation) to be written on top of argparse. >  :( And the problem with that being what? -- http://mail.python.org/mailman/listinfo/python-list

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Alice Bevan–McGregor
On 2011-01-11 00:32:32 -0800, Michele Simionato said: It's a pity that the argument parsing modules in the standard library are so verbose that everybody is reinventing the same thing :-( It looks like you have reinvented plac: http://pypi.python.org/pypi/plac After looking into it, Plac's def

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Alice Bevan–McGregor
On 2011-01-11 00:32:32 -0800, Michele Simionato said: On Jan 11, 8:25 am, Alice Bevan–McGregor wrote: I got tired of using PasteScript and OptParse.  Mostly OptParse, actually.  :/ It's a pity that the argument parsing modules in the standard library are so verbose that everybody is reinvent

Re: Ideas for a module to process command line arguments

2011-01-11 Thread Michele Simionato
On Jan 11, 8:25 am, Alice Bevan–McGregor wrote: explicit callbacks or typecasting functions, etc. > > I got tired of using PasteScript and OptParse.  Mostly OptParse, actually.  :/ It's a pity that the argument parsing modules in the standard library are so verbose that everybody is reinventing

Re: Ideas for a module to process command line arguments

2011-01-10 Thread Alice Bevan–McGregor
On 2011-01-10 21:18:41 -0800, Sohail said: Hey, every body has their own favorite method/ways to process command line arguments. I've worked on a little CPython extension to handle command line arguments may be you'll find it interesting and useful Even I've implemented my own way to hand