title: Can I use dictReader to ingest the output of lsof and ps?
body: <p>The standard Unix utilities like <a href="https://linux.die.net/man/8/lsof" rel="nofollow noreferrer"><code>lsof</code></a> and <a href="https://linux.die.net/man/1/ps" rel="nofollow noreferrer"><code>ps</code></a> produce output in a fixed width format with a header which should be easy to ingest programmatically.</p>
  
  <p>Alas, the existing answers to <a href="https://stackoverflow.com/q/4914008/850781">How to efficiently parse fixed width files?</a> require me to specify the column widths in advance instead of inferring then from the header line.</p>
  
  <p>So, what is the right way to ingest the output of <code>ps</code> and <code>lsof</code> (and their ilk) into Python?</p>