title: Catch python 'ImportError' if import from source directory
body: <p>When one tries to import a module <code>foo</code> while being in the source directory, one gets an rather confusing <code>ImportError</code> message: <code>ImportError: No module named foo</code>.</p>
  
  <p>How can I easily catch this case and return a more informative message, e.g. 'Please do not load module foo from the source directory'?</p>
  
  <p>Having the <code>__init__.py</code>, I would start with:</p>
  
  <pre><code>try:
      from _foo import *
  except ImportError:
      ## check whether in the source directory...
  </code></pre>
  
  <p>So I would like to distinguish the different causes for an <code>ImportError</code> (e.g. because a module named <code>foo</code> is not installed at all), and detect the case in which the <code>setup.py</code> is located in the current directory.  What would be a elegant way of doing this?</p>