title: import file but reports error NameError: name 'something' is not defined
body: <p>testa.py</p>
  
  <pre><code>class A:
  
      s1 = 333
      __age = 0
  
      def __init__(self,age ):
          self.__age=age
          return
  
      def __del__(self):  
  
          return  
      #private
      def __doSomething(self, s): 
          print self.__age 
          return            
      #public
      def doSomething(self, s):  
          self.__doSomething(s)    
          print s
  </code></pre>
  
  <p>test.py</p>
  
  <pre><code>import sys
  import testa
  
  a=A(111)
  a.doSomething('222')
  </code></pre>
  
  <p>run</p>
  
  <pre><code>python test.py
  </code></pre>
  
  <p>it reports error:</p>
  
  <pre><code>NameError: name 'A' is not defined
  </code></pre>
  
  <p>your comment welcome</p>