Change String Format Delimeters In Python
I'd like to template out some config files, but they are not compatible with python's 'this is a {template}'.format(template='string') formatting eg. curly braces are part of the
Solution 1:
The solution is to use string.Template
, and remember to escape all the $
's
http://docs.python.org/2/library/string.html#template-strings
Post a Comment for "Change String Format Delimeters In Python"