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

Popular posts from this blog

c# - Is it possible to remove an existing registration from Autofac container builder? -

delphi - How do I identify what code is generating " '' is not a valid floating point value" error dialogue box -