title: How do you import a list of classes from a module?
body: <p>Is there a way to import only a specific, predefined list of classes from a Python module? For example, say that I had modules <code>a.py</code> and <code>b.py</code> in the same directory with the following code:</p>
  
  <pre><code>#a.py
  class Foo(object):
      '''definition of class Foo goes here'''
  
  class Bar(object):
      '''definition of class Bar goes here'''
  
  aTypes = [Foo, Bar]
  </code></pre>
  
  <p>_</p>
  
  <pre><code>#b.py
  from a import aTypes
  
  print Foo
  </code></pre>
  
  <p>Running <code>b.py</code> causes, of course, the <code>print Foo</code> line to raise a <code>NameError</code>. I didn't really think that this would work (the import statement in <code>b.py</code> gives me an <code>a.Foo</code> type instead of a <code>Foo</code> type), but I can't figure out the right syntax. Is there an alternative to <code>from a import aTypes</code> that gives the desired behavior?</p>