title: Python: Reference to a class from a string?
body: <p>How to use a string containing a class name to reference a class itself?<br>
  See this (not working) exemple...</p>
  
  <pre><code>class WrapperClass:
      def display_var(self):
          #FIXME: self.__class_name__.__name__ is a string
          print self.__class__.__name__.the_var
  
  class SomeSubClass(WrapperClass):
      var = "abc"
  
  class AnotherSubClass(WrapperClass):
      var = "def"
  </code></pre>
  
  <p>And an obvious error message:</p>
  
  <pre>
  >>> b = SomeSubClass()
  >>> b.display_var()
  Traceback (most recent call last):
    File "", line 1, in 
    File "", line 4, in display_var
  AttributeError: 'str' object has no attribute 'the_var'
  >>> 
  </pre>
  
  <p>Thanks!</p>