[Python-ideas] Pyopt - an attempt at a pythonic optparse
ubershmekel at gmail.com
Mon Sep 7 02:34:52 CEST 2009
Currently the module handles positional arguments with one decorator and
keyword arguments (with '-' switches) using another decorator. Maybe I
should have linked to this more complete examples page:
Steven: Forgive me, I am new to this list and now after checking I'm
guessing you mean "stdlib-sig" is more fitting. So I'll move this discussion
Just to clarify why I feel getopt/optparse aren't as pythonic - to me they
feel clunky in that I need alot of ultra-explicit, extra-long lines to do
some very basic things. The python I'm used to allows me to use
open('filename').read() with reasonable default parameters. Now that I think
of it, actually wrapping optparse might have been an easier implementation
route for some of the functionality...
On Sun, Sep 6, 2009 at 10:39 PM, Sean Reifschneider <jafo at tummy.com> wrote:
> On 09/06/2009 02:21 AM, Steven D'Aprano wrote:
> > But handling the dash command line options is exactly what the module is
> > about.
> The example at the referenced page looks like it's all about handling
> non-option arguments. I must be missing something.
> Sean Reifschneider, Member of Technical Staff <jafo at tummy.com>
> tummy.com, ltd. - Linux Consulting since 1995: Ask me about High
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas