title: examine the variables when running python script in python environment?
body: <p>I run my python script after launching Python environment in bash. Then I want to examine a variable defined in my script. But I cannot. I wonder how I can run the script in Python while still being able to examine the variables defined in the script after finish running? Note that I don't want to write the values of the variables to a file or stdout. Thanks!</p>
  
  <pre><code>&gt;&gt;&gt; import myscript
  &gt;&gt;&gt; myvar
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  NameError: name 'myvar' is not defined
  </code></pre>