title: Python Config Parser can't find section?
body: <p>I'm trying to use ConfigParser to read a .cfg file for my pygame game. I can't get it to function for some reason. The code looks like this:</p>
  
  <pre><code>import ConfigParser
  def main():
      config = ConfigParser.ConfigParser()
      config.read('options.cfg')
      print config.sections()
      Screen_width = config.getint('graphics','width')
      Screen_height = config.getint('graphics','height')
  </code></pre>
  
  <p>The main method in this file is called in the launcher for the game. I've tested that out and that works perfectly. When I run this code, I get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "Scripts\Launcher.py", line 71, in &lt;module&gt;
      Game.main()
    File "C:\Users\astro_000\Desktop\Mini-Golf\Scripts\Game.py", line 8, in main
      Screen_width = config.getint('graphics','width')
    File "c:\python27\lib\ConfigParser.py", line 359, in getint
      return self._get(section, int, option)
    File "c:\python27\lib\ConfigParser.py", line 356, in _get
      return conv(self.get(section, option))
    File "c:\python27\lib\ConfigParser.py", line 607, in get
      raise NoSectionError(section)
  ConfigParser.NoSectionError: No section: 'graphics'
  </code></pre>
  
  <p>The thing is, there is a section 'graphics'.</p>
  
  <p>The file I'm trying to read from looks like this:</p>
  
  <pre><code>[graphics]
  height = 600
  width = 800
  </code></pre>
  
  <p>I have verified that it is, in fact called options.cfg.
  config.sections() returns only this: "[]"</p>
  
  <p>I've had this work before using this same code, but it wont work now. Any help would be greatly appreciated.</p>