title: How does Python handle subpackages?
body: <p>Say Ansible was installed by means of "pip install ansible". Right after the install the following import statement succeeds:</p>
  
  <pre><code>from ansible.module_utils.basic import AnsibleModule
  </code></pre>
  
  <p>Now, a local package named "ansible.module_utils.custom" is created. The directory structure:</p>
  
  <pre><code> ansible/
     __init__.py
     module_utils/
       __init__.py
       custom/
         __init__.py
         utils.py
  </code></pre>
  
  <p>As soon as this is put in place the aforementioned import statement fails. Claiming "basic" is undefined. The local package does indeed not declare a "basic" subpackage. Only the installed Ansible library does. It seems Python limited its search to the local package only.</p>
  
  <p>I was under the impression Python would consider the complete system path before giving up on finding code. That it would backtrack out of the local package and finally hit the installed Ansible library.</p>
  
  <p>Is this an incorrect assumption ? If so, is it possible at all to make the local package to coexist with the installed package ?</p>