Python fixed width strings with the Template object
<p>Is there a way make fixed width substitutions with the python String.Template objects substitution language</p>

<p>For example if I wanted s to be 'A string 0003' how would I modify this code:</p>

<pre><code>from string import Template
stmpl=Template("A string ${tcount}")
s=stmpl.substitute(tcount=3)
print(s)
</code></pre>

<p>Related question, not using template strings:
<a href="http://stackoverflow.com/questions/5138062/setting-fixed-length-with-python">Setting fixed length with python</a></p>
