title: how to get the current scope in python
body: <p>is there any reference to point to the current scope , i look up many articles and couldn't find the answer ,for example i want to print every var's content in current scope</p>
  
  <pre><code>for x in list(locals()):
      print(x)
  </code></pre>
  
  <p>but only give me this,the var's name</p>
  
  <pre><code>__builtins__
  __file__
  __package__
  __cached__
  __name__
  __doc__
  </code></pre>
  
  <p>i dont want code like this</p>
  
  <pre><code>print(__builtins__)
  print(__file__)
  print(__package__)
  print(__cached__)
  print(__name__)
  print(__doc__)
  ....
  </code></pre>