title: python get module variable by name
body: <p>I'm trying to find a way to access module variable by name, but haven't found anything yet. The thing I'm using now is:</p>
  
  <pre><code>var = eval('myModule.%s' % (variableName))
  </code></pre>
  
  <p>but it's fuzzy and breaks IDE error checking (i.e. in eclipse/pydev import myModule is marked as unused, while it's needed for above line). Is there any better way to do it? Possibly a module built-in function I don't know?</p>