There's a Moore's Law effect in Python command-line processing. Every 18 months, it gets 50% easier or 50% more powerful. Simon Willison is keeping the effect going with optfunc, which introspects a function definition and creates the optparse parser needed to grab its arguments from the command line. Very clever.

tagged: » 1 reaction

Comments

[gravatar]
Larry Hastings 8:48 PM on 29 May 2009

CommandLineApp does something like this too:
http://www.doughellmann.com/projects/CommandLineApp/

But it both giveth and taketh away; ultimately I wound up rolling my own cheap clone that I felt was incrementally more Pythonic.

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.