title: Delete Sections and Keys from INI file Using Python Module iniparse?
body: <p>I'm using the Python module <a href="http://code.google.com/p/iniparse/" rel="nofollow">iniparse</a> to save keys to an INI file, but I was wondering if there is a way to delete keys and sections from the INI file using <code>iniparse</code>.  I know it's possible using <a href="http://docs.python.org/library/configparser.html" rel="nofollow">ConfigParser</a> and that <code>iniparse</code> is backwards compatible with <code>ConfigParser</code>, but I can't figure out how to perform the deletions using the same <code>iniparse</code> object.</p>
  
  <pre class="lang-py prettyprint-override"><code>from iniparse import INIConfig, RawConfigParser
  
  cfg = INIConfig(open('options.ini'))
  print cfg.section.option
  cfg.section.option = 'new option'
  
  # Maybe I need to use RawConfigParser somehow?
  cfg.remove_option('section','option')
  cfg.remove_section('section')
  
  f = open('options.ini', 'w')
  print &gt;&gt;f, cfg
  f.close()
  </code></pre>