optparse alternative

2005-03-14 Thread Henry Ludemann
I've been writing an optparse alternative (using getopt) that is at a stage where I'd be interested in people's opinions. It allows you to easily creating command line interfaces to existing functions, using flags (which are optional) and arguments. It will automatically print a nicely formatted us

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
Thanks for the comments... Steven Bethard wrote: Looks interesting, but is it really that different from optparse? In the sense that they both do the same thing, no, not really. But the way they do it is quite different; optparse bases itself on setting variables, while this module is for invoking

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
* The more I think about it, the more I like that you're basically constructing options to match a function signature. But I can imagine that this might be too restrictive for some uses. It might be worth having an alternate interface that provides an options object like optparse does. It i

Re: optparse alternative

2005-03-14 Thread Henry Ludemann
As far as I can tell, your module has one functional advantage over optparse--it validates arguments as well as options. Functionality wise, that is probably about it. It is more from a seperation of command line / functionality code that I wrote this; that the command line code should be sepera