title: Running psql command from Python to restore from a PostgreSQL dump file
body: <p>How would I run this psql command from a Python script?</p>
  
  <pre><code>psql dbname &lt; dump.sql
  </code></pre>
  
  <p>I have looked at subprocess, but it is not clear how to handle the <code>&lt;</code> redirect from file.</p>