|
From: Jacob B. <jak...@gm...> - 2012-07-03 15:38:40
|
Hi! I've just opened up a StackOverflow question about ConfigObj. http://stackoverflow.com/questions/11314068/why-doesnt-kwargs-interpolate-with-python-configobj I'm using ConfigObj <http://www.voidspace.org.uk/python/configobj.html> in python with Template-style interpolation. Unwrapping my config dictionary via ** doesn't seem to do interpolation. Is this a feature or a bug? Any nice workarounds? $ cat my.conf foo = /test bar = $foo/directory >>> import configobj >>> config = configobj.ConfigObj('my.conf', interpolation='Template') >>> config['bar'] '/test/directory' >>> '{bar}'.format(**config) '$foo/directory' I'd expect the second line to be /test/directory. Why doesn't interpolation work with **kwargs? Thanks for any help you can offer! -- Jake Biesinger |