title: python import statements
body: <p>I've started working on Python for about a month now and I've ran into something I would like to understand better. It's related to imports. So I have a module:
       root.core.connectivity</p>
  
  <p>Now in this module I have defined a class Connectivity. This module also has a <code>__main__</code> only for testing purposes(not sure if this makes any differences).</p>
  
  <p>Now if I do:</p>
  
  <pre><code>from root.core.connectivity import Connectivity as class_name
  </code></pre>
  
  <p>This works fine, however if I try:</p>
  
  <pre><code>import root.core.connectivity.Connectivity as class_name
  </code></pre>
  
  <p>This will fail with:</p>
  
  <pre><code>ImportError: No module named Connectivity
  </code></pre>
  
  <p>So my question is, why does it fail and what are the differences between the two statements.</p>
  
  <p>Regards,
  Bogdan</p>