title: Python: wildcard subset import
body: <p>We have all been told using <code>from module import *</code> is a bad idea. However, is there a way to import a <strong>subset</strong> of the contents of <code>module</code> using a wildcard?</p>
  
  <p>For example:</p>
  
  <p>module.py:</p>
  
  <pre><code>MODULE_VAR1 = "hello"
  MODULE_VAR2 = "world"
  MODULE_VAR3 = "The"
  MODULE_VAR4 = "quick"
  MODULE_VAR5 = "brown"
  ...
  MODULE_VAR10 = "lazy"
  MODULE_VAR11 = "dog!"
  MODULE_VAR12 = "Now"
  MODULE_VAR13 = "is"
  ...
  MODULE_VAR98 = "Thats"
  MODULE_VAR99 = "all"
  MODULE_VAR100 = "folks!"
  
  def abs():
      print "Absolutely useful function: %s" % MODULE_VAR1
  </code></pre>
  
  <p>Obviously we don't want to use <code>from module import *</code> because we'd be overriding the <code>abs</code> function. But suppose we DID want all of the <code>MODULE_VAR*</code> variables to be accessible locally.</p>
  
  <p>Simply putting <code>from module import MODULE_VAR*</code> doesn't work. Is there a way to accomplish this? </p>
  
  <p>I used 100 variables as an illustration, because doing <code>from module import MODULE_VAR1, MODULE_VAR2, MODULE_VAR3, ..., MODULE_VAR100</code> would obviously be incredibly unwieldy and wouldn't work if more variables (e.g. <code>MODULE_VAR101</code>) were added.</p>