title: Can a python script access variables defined in an interactive session?
body: <p>So, for instance, I'm in an ipython session, and I have a variable, </p>
  
  <pre><code>var = [3,5,6]
  </code></pre>
  
  <p>defined in the ipython session, that I want to do something with by running a script, e.g.:</p>
  
  <pre><code># my_script
  plot(var)
  </code></pre>
  
  <p>so I want typing</p>
  
  <pre><code>%run my_script.py 
  </code></pre>
  
  <p>from the interactive session to plot var, as if I had typed:</p>
  
  <pre><code>plot(var)
  </code></pre>
  
  <p>within the interactive session.</p>
  
  <p>Is this possible?  How?</p>