Python: Formatting a string using variable names placeholders
Have you tried s="svn cp {root_dir}/{trunk}/ {root_dir}/{tag}/".format(**locals())
?
You can use locals()
function
s="svn cp {root_dir}/{trunk}/{root_dir}/{tag}/".format(**locals())
EDIT:
Since python 3.6 you can use string interpolation:
s = f"svn cp {root_dir}/{trunk}/{root_dir}/{tag}/"