title: ConfigParser.MissingSectionHeaderError when reading config file Python
body: <p>I am trying to read some values from a config file params.txt using ConfigParser in Python but keep getting a MissingSectionHeadError</p>
  
  <p>I have a file params.txt:</p>
  
  <pre><code>[all]
  zigzag = 0.08
  fractal = 0.03
  rng_length = 1000
  stp = 100
  </code></pre>
  
  <p>and the following code:</p>
  
  <pre><code>parser = cp.SafeConfigParser()
  g = open(params, 'r')
  g.readline()
  parser.readfp(g)
  print parser.getfloat('all', zigzag)
  </code></pre>
  
  <p>where I am getting this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "deadrabbit_console_0-1.py", line 166, in &lt;module&gt;
      DRconsole().cmdloop()
    File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop
      stop = self.onecmd(line)
    File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
      return func(arg)
    File "deadrabbit_console_0-1.py", line 127, in do_load_data
      get_data(series, params)
    File "deadrabbit_console_0-1.py", line 115, in get_data
      parser.readfp(g)
    File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
      self._read(fp, filename)
    File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
      raise MissingSectionHeaderError(fpname, lineno, line)
  ConfigParser.MissingSectionHeaderError: File contains no section headers.
  file: /home/baconwichsand/Documents/Dead Rabbit/params.txt, line: 1
  'zigzag = 0.08\n'
  </code></pre>
  
  <p>What's wrong?</p>