[stdlib-sig] Pyopt - command-line options that are alot easier than optparse

holger krekel holger at merlinux.eu
Fri Sep 11 08:30:38 CEST 2009


On Fri, Sep 11, 2009 at 01:11 +0300, Yuvgoog Greenle wrote:
> >    @cmdline
> >    def main(archer=str, boulder=float, magic=42):
> >
> > which would wrap a parser around the function
> > and otherwise work like your example. This can
> > easily work down to Python2.3.
> >
> > cheers,
> > holger
> >
> 
> That is a really clever idea, it took me a while just to understand how it'd
> work. If it weren't so hacky-lookin I would indeed consider it. I mean, any
> pythonista would look and say "dude, you've got a bug, that doesn't make
> sense". 

hehe, sure.  one of the reasons it didn't go public. 

> Either way, I'm gonna add pyopt to PyPI

cheers,
holger

> -- 
> Yuv
> http://code.google.com/p/pyopt/

-- 
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu 


More information about the stdlib-sig mailing list