title: What is the best way to deal with import cycle in Python?
body: <p>In our projects we have level 'controls' with the following modules: 'grid', 'gridcell', 'combo' and etc. Grid module imports gridcell module since grid consists of cells, while any cell can contain combo inside it. So initially we starting to use 'from ... import ...' statements inside these classes the following way:</p>
  
  <pre><code>#grid.py
  from controls.gridcell import cell
  #gridcell.py
  from controls.combo import combo
  </code></pre>
  
  <p>But this was ok until we start using grid as a combo content. As soon as we start doing this  we were required to add 'from grid import grid' statement into the 'combo.py'. After doing this we get an import exception:</p>
  
  <pre><code>from controls.gridcell import gridcell 
  ImportError: Cannot import name gridcell 
  </code></pre>
  
  <p>EDITED:</p>
  
  <p>I have tried also 'import ... as ...' and get the following error:</p>
  
  <pre><code>import controls.gridcell as gridcell
  AttributeError: 'module' object has no attribute 'gridcell'
  </code></pre>
  
  <p>I have read several articles and all that i have found about how to solve this is to use 'import' statement without from, e.g:</p>
  
  <pre><code>#grid.py
  import controls.gridcell
  #gridcell.py
  import controls.combo
  #combo.py
  import controls.grid
  </code></pre>
  
  <p>But this leads us to use full names like 'controls.gridcell.cell', 'controls.combo.combo', 'controls.grid.grid' and so on.</p>
  
  <p>So my question is - Is there any other way how to do this(so it would be available to use shorter names) or this is the only way of how to resolve this issue?</p>
  
  <p>Sorry if i miss something</p>
  
  <p>Thanx to all</p>