title: Python run multiple files interactively
body: <p>In python, you can run <code>python3 -i some_file.py</code> to run <code>some_file.py</code>, then open an interactive session in the file, allowing you to debug and such.</p>
  <p>I have my own file full of functions and things to use for testing stuff out <code>python3 -i ~/testing_functions.py</code>.</p>
  <p>Is there a way I could use this in another file: <code>python3 -i some_file.py -i ~/testing_functions.py</code></p>
  <pre class="lang-py prettyprint-override"><code># a.py
  a = &quot;A&quot;
  
  # b.py
  b = &quot;B&quot;
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code># in the shell
  $ python3 -i a.py -i b.py
  &gt;&gt;&gt; print(a)
  A
  &gt;&gt;&gt; print(b)
  B
  &gt;&gt;&gt; pribt(a+b)
  AB
  </code></pre>
  <p>When I try <code>python -i file.py -i other.py</code> is does not work, and neither does <code>python -i file.py other.py</code></p>
  <p>I would like to avoid just importing if possible, as I don't know what directory I will be in or file I will test, and relative vs. absolute imports confuse me.</p>