title: Value Error unsupported format character '"' when using % string formatting
body: <p>I'm trying to use string formatting to convert incoming CSV to XML. I'm getting the following error:</p>
  
  <pre><code>ValueError: unsupported format character '"' (0x22) at index 36
  </code></pre>
  
  <p>I understand that I'm using an " somewhere I shouldn't but can't find where that is. The " inside the template should all be encapsulated inside the """ ... """ and I can't see any elsewhere in the script. </p>
  
  <p>Could anyone suggest where I've gone wrong?</p>
  
  <pre><code>import csv
  import sys
  
  
  def csvDict(csvRow):
      dict = {'Name': csvRow[0], 'p1t': csvRow[1], 'p1l': csvRow[2], 'p2t': csvRow[3], 'p2l': csvRow[4],
              'outputWidth': csvRow[5], 'sourceTop': csvRow[6], 'sourceLeft': csvRow[7], 'sourceWidth': csvRow[8],
              'sourceHeight': csvRow[9]}
      return dict
  
  
  # Get CSV File from the argument
  csvFile = csv.reader(open(sys.argv[1], 'rt'))
  
  # Convert CSV Into list for Processing
  csvList = list(csvFile)
  
  # Setup XML Variables Dictionary
  outputVars = csvDict(csvList[0])
  
  # Confirm Dictionary contains the right data
  print outputVars
  
  
  # XML Format Template
  mapTemplate = """&lt;map type="map2dpanel" name="%(Name)" width="%(outputWidth)" &gt;
          &lt;point id="1" top="%(p1t)" left="%(p1l)" /&gt;&lt;point id="2" top="%(p2t)" left="%(p2l)" /&gt;
          &lt;source image="current source" top="%(sourceTop)" left="%(sourceLeft)" width="%(sourceWidth)" height="%(sourceHeight)" /&gt;
      &lt;/map&gt;
  """
  
  print mapTemplate % outputVars
  </code></pre>