title: How to execute another python script from your script and be able to debug?
body: <p>You have wrapper python script that is calling another python script, currently using <code>os.system('python another.py some-params')</code>.</p>
  
  <p>You want to be able to debug both scripts and if you use <code>os.system()</code> you'll loose the debugger, so it does make sense to load the second script using the same interpretor instead of starting another one.</p>
  
  <p><code>import</code> doesn't to the expected thing because it does not run the <code>__main__</code>.</p>
  
  <p>Other variants, like <code>exec()</code> or <code>runpy</code> seams to miss the <code>argv</code> parameters.</p>
  
  <p>What solution do you see for this issue?</p>
  
  <p>I'm looking for a solution that does not require you to modify the <code>another.py</code> script. Probably this will require to modify the <code>sys.argv</code> before executing it.</p>