split python source code into multiple files?
<p>I have a code that I wish to split apart into multiple files. In matlab one can simply call a <code>.m</code> file, and as long as it is not defined as anything in particular it will just run as if it were part of the called code. Example (edited):<br>
<strong>test.m</strong> (matlab)</p>

<pre><code>function [] = test()
    ... some code using variables ...
    test2
</code></pre>

<p><strong>test2.m</strong> (matlab)</p>

<pre><code>... some more code using same variables ...
</code></pre>

<p>Calling <code>test</code> runs the code in test as well as the code in test2.</p>

<p>Is there a similar way for python, to put <code>... some more code ...</code>, into an external file, that will simply be read as if it is in the file that it is called from? </p>
