title: Properly importing modules in Python
body: <p>How do I set up module imports so that each module can access the objects of all the others?</p>
  
  <p>I have a medium size Python application with modules files in various subdirectories.  I have created modules that append these subdirectories to <code>sys.path</code> and imports a group of modules, using <code>import thisModule as tm</code>.  Module objects are referred to with that qualification.  I then import that module into the others with <code>from moduleImports import *</code>.  The code is sloppy right now and has several of these things, which are often duplicative.</p>
  
  <p>First, the application is failing because some module references aren't assigned.  This same code does run when unit tested.</p>
  
  <p>Second, I'm worried that I'm causing a problem with recursive module imports.  Importing moduleImports imports thisModule, which imports moduleImports . . . .</p>
  
  <p>What is the right way to do this?</p>