title: Preserve case in ConfigParser?
body: <p>I have tried to use Python's <a href="http://docs.python.org/library/configparser.html" rel="noreferrer">ConfigParser</a> module to save settings. For my app it's important that I preserve the case of each name in my sections. The docs mention that passing str() to <a href="http://docs.python.org/library/configparser.html#ConfigParser.RawConfigParser.optionxform" rel="noreferrer">ConfigParser.optionxform()</a> would accomplish this, but it doesn't work for me. The names are all lowercase. Am I missing something?</p>
  
  <pre><code>&lt;~/.myrc contents&gt;
  [rules]
  Monkey = foo
  Ferret = baz
  </code></pre>
  
  <p>Python pseudocode of what I get:</p>
  
  <pre><code>import ConfigParser,os
  
  def get_config():
     config = ConfigParser.ConfigParser()
     config.optionxform(str())
      try:
          config.read(os.path.expanduser('~/.myrc'))
          return config
      except Exception, e:
          log.error(e)
  
  c = get_config()  
  print c.options('rules')
  [('monkey', 'foo'), ('ferret', 'baz')]
  </code></pre>