title: Read all the contents in ini file into dictionary with Python
body: <p>Normally, I code as follows for getting a particular item in a variable as follows</p>
  
  <pre><code>try:
      config = ConfigParser.ConfigParser()
      config.read(self.iniPathName)
  except ConfigParser.MissingSectionHeaderError, e:
      raise WrongIniFormatError(`e`)
  
  try:
      self.makeDB = config.get("DB","makeDB")
  except ConfigParser.NoOptionError:
      self.makeDB = 0
  </code></pre>
  
  <p>Is there any way to read all the contents in a python dictionary? </p>
  
  <p>For example</p>
  
  <pre>
  [A]
  x=1
  y=2
  z=3
  [B]
  x=1
  y=2
  z=3
  </pre>
  
  <p>is written into </p>
  
  <pre>
  val["A"]["x"] = 1
  ...
  val["B"]["z"] = 3
  </pre>