title: How to get python input to work when running as module?
body: <p>I have a package that calls for an <code>input()</code>. However due to internal relative imports, I am forced to run my module with <code>python -m</code>.</p>
  <p>When I do so, I get the following error:</p>
  <pre><code>EOFError: EOF when reading a line
  </code></pre>
  <p>To make the code work, I have to run python interactively, i.e. <code>python -i -m</code>.
  But this means that when I exit the program within the code with <code>exit()</code>, it will raise a <code>SystemExit</code> exception, and the terminal will remain within the interactive shell, which is undesirable.</p>
  <p>How can I do without <code>python -i</code>?</p>