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? -

asp.net - RadAsyncUpload in code behind, how to? -