title: read plist files in non-XML format using python
body: <p>I am reading MacOS data that is in plist (propertly list) format that is not in the XML format, not in the binary format, but in the other ascii format. For example:</p>
  
  <pre><code>addr= {
      City = "San Francisco Bay Area";
  }
  </code></pre>
  
  <p>I am trying to parse this into a Python dictionary. Unfortunately, <code>plistlib.loads</code> returns <code>InvalidFileException()</code> when I try to parse it:</p>
  
  <pre><code>import plistlib
  
  plist=b"""
  addr= {
      City = "San Francisco Bay Area";
  }
  """
  
  print( plistlib.loads( plist ) )
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>Traceback (most recent call last):
    File "x.py", line 9, in &lt;module&gt;
      print( plistlib.loads( plist ) )
    File "/Users/simsong/anaconda/lib/python3.6/plistlib.py", line 1024, in loads
      fp, fmt=fmt, use_builtin_types=use_builtin_types, dict_type=dict_type)
    File "/Users/simsong/anaconda/lib/python3.6/plistlib.py", line 1009, in load
      raise InvalidFileException()
  plistlib.InvalidFileException: Invalid file
  </code></pre>
  
  <p>What's the correct way to do this?</p>