title: What is the best way to call a script from another script?
body: <p>I have a script named <code>test1.py</code> which is not in a module. It just has code that should execute when the script itself is run. There are no functions, classes, methods, etc. I have another script which runs as a service. I want to call <code>test1.py</code> from the script running as a service.</p>
  <p>For example:</p>
  <p>File <strong><code>test1.py</code></strong>:</p>
  <pre><code>print &quot;I am a test&quot;
  print &quot;see! I do nothing productive.&quot;
  </code></pre>
  <p>File <strong><code>service.py</code></strong>:</p>
  <pre><code># Lots of stuff here
  test1.py # do whatever is in test1.py
  </code></pre>
  <p>I'm aware of one method which is opening the file, reading the contents, and basically evaluating it. I'm assuming there's a better way of doing this. Or at least I hope so.</p>