title: python import module to work globally
body: <p>I've got a problem trying to get python to accept an import 'globally'</p>
  
  <p>In a module it needs to import another module depending on another variable but it doesn't seem to import it into all of the module functions if i have it in the start function; for example:</p>
  
  <pre><code>def start():
      selected = "web"
      exec("from gui import " + selected + " as ui")
      log("going to start gui " + selected)
      ui.start()
  </code></pre>
  
  <p>this works but in the same module:</p>
  
  <pre><code>def close():
      ui.stop()
  </code></pre>
  
  <p>doesn't work. i don't know what's going on here</p>
  
  <p>Joe</p>