title: running python script in interactive python prompt and keep the variables?
body: <p>I understand from <a href="https://stackoverflow.com/questions/1522564/how-do-i-run-a-python-program">How do I run a Python program?</a> that in command prompt i can use </p>
  
  <pre><code>C:\python&gt;python first.py
  </code></pre>
  
  <p>, to run <code>first.py</code>. </p>
  
  <p>But, is it possible, that after i entered the interactive python prompt, by runnning </p>
  
  <pre><code>C:\python&gt;python 
  </code></pre>
  
  <p>and see the <code>&gt;&gt;&gt;</code> python indication, run <code>first.py</code>, and after finished running <code>first.py</code>, back to the interactive python prompt, I could see variables defined inside <code>first.py</code>?</p>
  
  <p>For example, if <code>first.py</code> created some variables inside, e.g. by</p>
  
  <pre><code>(x,y) = [3,5]
  </code></pre>
  
  <p>, is it possible that after running <code>first.py</code> and back to the interactive python prompt, <code>x</code> and <code>y</code> are still there?</p>
  
  <p><a href="https://stackoverflow.com/questions/14894993/running-windows-shell-commands-with-python">Running windows shell commands with python</a> shows how to run the windows shell command in python, so in the interactive python prompt, i could actually use</p>
  
  <pre><code>&gt;&gt;&gt;os.system('python first.py')
  </code></pre>
  
  <p>to run <code>first.py</code>, but <code>x</code> and <code>y</code> defined inside are lost after running.</p>