title: How to process a YAML stream in Python
body: <p>I have a command line app the continuously outputs YAML data in the form:</p>
  
  <pre>
  - col0: datum0
    col1: datum1
    col2: datum2
  - col0: datum0
    col1: datum1
    col2: datum2
  ...
  </pre>
  
  <p>It does this for all of eternity. I would like to write a Python script that continuously reads each of these records.</p>
  
  <p>The PyYAML library seems best at taking fully loaded strings and interpreting those as a complete YAML document. Is there a way to put PyYAML into a "streaming" mode?</p>
  
  <p>Or is my only option to chunk the data myself and feed it bit by bit into PyYAML?</p>