title: "SyntaxError: keyword can't be an expression" using template
body: <p>To a function I am passing in a string <code>command</code> and a list of strings <code>ports</code>
       An example:</p>
  
  <pre><code>command = "a b c {iface} d e f"
  ports = ["abc", "adsd", "12", "13"]
  </code></pre>
  
  <p>These get passed to this function where I want to get multiple strings for command, replacing
  <code>{iface}</code> with each element in <code>ports</code></p>
  
  <pre><code>def substitute_interface(command, ports):
      t = string.Template(command)
      for i in ports:
          print t.substitute({iface}=i)
  </code></pre>
  
  <p>I get the error in the title, what am i doing wrong?</p>