title: Python 2.7 format string padding with more than one char
body: <h1>The Problem</h1>
  
  <p>I've been able to pad a string with asterisk, however I'd like to see if it is possible to pad it with an asterisk and a space.</p>
  
  <h1>Example Output</h1>
  
  <p>What I've been able to get</p>
  
  <p><code>****************************Hello World***************************</code></p>
  
  <p>... trying to get</p>
  
  <p><code>* * * * * * * * * * * * * * Hello World* * * * * * * * * * * * * *</code></p>
  
  <h1>Attempts</h1>
  
  <p>Naively I tried passing a <code>" *"</code> to the fill parameter of the format specs. This returned with an error:</p>
  
  <p><code>Traceback (most recent call last):
    File "main.py", line 17, in &lt;module&gt;
      ret_string = '*{:{f}^{n}}'.format(string, f=filler, n=line_len)
  ValueError: Invalid conversion specification</code></p>
  
  <p>Then I tried using an escape character, <code>"\s*"</code>, which yielded the same result. Finally I revisited the documentation <a href="https://docs.python.org/3.4/library/string.html#format-specification-mini-language" rel="nofollow noreferrer">6.1.3.1. Format Specification Mini-Language</a> and see the input spec appears to be limited to a character and not open to strings. Is there a way around this? I thought of making a sort of compound reference ie <code>{{char1}{char2}}</code> but that doesn't seemed to have worked either.</p>
  
  <p>Thoughts?</p>
  
  <h1>The Code</h1>
  
  <pre><code>import fileinput
  
  string     = "Hello World"
  ret_string = ""
  line_len   = 65
  filler    = " *"
  
  
  for inputstring in fileinput.input():
      string = inputstring.strip(" \n")
  
  ret_string = '{:{f}^{n}}'.format(string, f=filler, n=line_len)
  print(ret_string)
  </code></pre>