title: Nested module and package imports in Python
body: <p>We have a VERY large python project (200+ files)</p>
  
  <p>and up till now I've been handling it dependencies very well there are  a few spots where some new part of the project used and existing part from another module and it's been simple enough to make sure everything imports in the right order.</p>
  
  <p>but now I'm getting into trouble when a module in a sub-package requires a module form another sub-package</p>
  
  <p>to illustrate take this simplified version</p>
  
  <p>the file system</p>
  
  <pre><code>Core
  |__init__.py
  |Database
  -|__init__.py
  -|Dialogs
  --|__init__.py
  --|SomeDialog.py
  -|Controls
  --|__init__.py
  --|SomeControl.py
  |Frame.py
  </code></pre>
  
  <p>now if in <code>SomeControl.py</code> I import <code>SomeDialog.py</code> via this statement 
  <code>from Core.Dialogs.SomeDialog import SomeDialog</code>
  where <code>SomeDialog</code> is a class in the file <code>Somedialog</code></p>
  
  <p>When I go to <code>import Core</code> in the main application I get an error that "Core" has no module "Database"</p>
  
  <p>how can I fix this?</p>