Simon’s optfunc

Friday 29 May 2009This is 14 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.


CommandLineApp does something like this too:

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.