[stdlib-sig] Pyopt - command-line options that are alot easier than optparse
Yuvgoog Greenle
ubershmekel at gmail.com
Fri Sep 11 00:11:35 CEST 2009
>
>
> @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". Either way, I'm gonna add pyopt to PyPI
--
Yuv
http://code.google.com/p/pyopt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/stdlib-sig/attachments/20090911/0778b268/attachment-0001.htm>
More information about the stdlib-sig
mailing list