How to escape character '.' in python string replacement via the operator % -
i want following
"@file %(unitname).c" % {'unitname':'test'}   but complains '.c'. how can escape '.' character?
you don't. fix format specifier.
"@file %(unitname)s.c" % {'unitname':'test'}      
Comments
Post a Comment