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

Javascript line number mapping -

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

php - Mysql PK and FK char(36) vs int(10) -