title: Python List ONLY the variables I have created
body: <p>I have run my Python script that created <code>22</code> variables according to <code>%whos</code> IPython command.</p>
  
  <p>I want to be able to list MY variables from within a Python (not IPython) script.</p>
  
  <p>So far, I tried <code>dir()</code>, <code>vars().keys()</code>, <code>locals().keys()</code> and <code>globals().keys()</code> :</p>
  
  <pre><code>In [2]: len( [v for v in dir() if not v.startswith('_')] )
  Out[2]: 1015
  
  In [3]: len( [v for v in vars().keys() if not v.startswith('_')] )
  Out[3]: 1015
  
  In [4]: len( [v for v in locals().keys() if not v.startswith('_')] )
  Out[4]: 1015
  
  In [5]: len( [v for v in globals().keys() if not v.startswith('_')] )
  Out[5]: 1015
  </code></pre>
  
  <p>I ONLY want MY variables that I created, how can I do that ?</p>