Friday, March 9, 2012

Recursively formatting a dictionary of strings

I have a use-case where I'm using a dictionary as a basis for generating a configuration file, and many of the values in the file share pieces, such as URL bases or credentials. I will also be generating configuration files for several different instances from the same dictionary.
I wanted a simple way to define replaceable parts of the dictionary. I made a couple of Google searches, didn't find anything on the first page, so I wrote this:
I hope it's useful to someone else, or that I find it next time I have this use-case. :)

Thursday, March 8, 2012

Shoutout to PyDev

I've been using PyDev for many years, for Python and Jython development of all kinds. The more recent releases have made some big usability improvements. Specifically, autocompletion works in many more cases, and the built-in refactoring support is proving handy. Rough edges that have bugged me for years are being steadily smoothed away.
So thanks for all the free stuff Fabio! If I was at PyCon I would buy you a drink.