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

mod rewrite - Doing external redirect. .htaccess NS flag not working. How to achieve similar results? -

python - Does anyone know how to configure the hunpos wrapper class on nltk? -