title: how to interpolate the section-name with configparser
body: <p>I'm using <code>configparser</code> to read configuration for a backup-system.
  one of the options (the output path) <em>often</em> includes the section-name itself.</p>
  
  <pre><code>[DEFAULT]
  compression=gzip
  
  [foo]
  output=/Backups/foo/
  [pizza]
  output=/BigDisk/Backups/
  [bar]
  output=/Backups/bar/
  </code></pre>
  
  <p>Now I would like to get rid manually appending the section name, and instead would like to use string interpolation. Something like the following:</p>
  
  <pre><code>[DEFAULT]
  compression=gzip
  output=/Backups/%(SECTION)s/
  
  [foo]
  [pizza]
  output=/BigDisk/Backups/
  [bar]
  </code></pre>
  
  <p>Unfortunately i haven't found the variable-name that would expand to the section name yet (it's obviously not <code>SECTION</code>).</p>
  
  <p>Is it possible at all (ideally without having to build my own ConfigParser sub-class)?</p>
  
  <p>An ugly workaround would be to add an option <code>append_section_name</code> (and set it to <code>yes</code> in the <code>DEFAULT</code> section and to <code>no</code> in the <code>pizza</code> section) and manually do the interpolation. I'd rather not...</p>