Simon’s optfunc

Friday 29 May 2009This is over 15 years old. Be careful.

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.

Comments

[gravatar]
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:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.