News for hackers. Stuff that matters.
Re:Opster: Pythonic option parsing by DannoHung on Monday September 14, 2009 @07:11PM (#822833)
I like optparse, but I wish it handled positional arguments too.

(I fully expect someone to now come and tell me how to get it to handle positional arguments easily)

Re:Opster: Pythonic option parsing by makecheck on Monday September 14, 2009 @11:22PM (#823214)
I think what you're looking for is the parse_args() method, which returns a pair; one part is the named option values, the other part is everything that's left. So you handle positional arguments by iterating over the "what's left" part.
Re:Opster: Pythonic option parsing by DannoHung on Wednesday September 16, 2009 @11:00AM (#825931)
Nope. I still need to

# Check which arguments are available

# Cast them

# Provide utilization information for the arguments

# Provide defaults

# Do all the other stuff that optparse does for options

Hmm... I guess Google's argparse really is the future.