title: Pipe the output of a program as args into a Python script?
body: <p>I'm writing a script to take in the JSON output of some LXD containers in my infrastructure. LXD pretty-prints some JSON and I was to feed that JSON into my Python script.</p>
  <pre><code>python myscript.py | lxc list --format json
  </code></pre>
  <p>What can I do in my script to read this data correctly or have it handle this piped input?</p>
  <h1>Attempt</h1>
  <pre><code>import sys
  for line in sys.stdin:
      print line
  </code></pre>