title: Python: skip comment lines marked with # in csv.DictReader
body: <p>Processing CSV files with <a href="http://docs.python.org/2/library/csv.html#csv.DictReader" rel="noreferrer">csv.DictReader</a> is great - but I have CSV files with comment lines (indicated by a hash at the start of a line), for example:</p>
  <pre class="lang-none prettyprint-override"><code># step size=1.61853
  val0,val1,val2,hybridisation,temp,smattr
  0.206895,0.797923,0.202077,0.631199,0.368801,0.311052,0.688948,0.597237,0.402763
  -169.32,1,1.61853,2.04069e-92,1,0.000906546,0.999093,0.241356,0.758644,0.202382
  # adaptation finished
  </code></pre>
  <p>The csv module <a href="http://bugs.python.org/issue1225769" rel="noreferrer">doesn't include any way to skip such lines</a>.</p>
  <p>I could easily do something hacky, but I imagine there's a nice way to wrap a <code>csv.DictReader</code> around some other iterator object, which preprocesses to discard the lines.</p>