title: Python ImportError: cannot import name XXXX
body: <p>I am very new to python (just started reading Learn Python the Hard Way...) and couldn't understand why I got this rather infamous import error. I have seen a lot other import error posts but none of them is the same as mine (at least I didn't find the same post).</p>
  
  <p>I have a project directory called <code>ex48 (D:\LearnPython\projects\ex48)</code>, inside it there is a <strong>sub-folder</strong> also called ex48 e.g. <code>D:\LearnPython\projects\ex48\ex48</code>(is this bad practice to name directory like this?). There is a <code>ex48.py</code> file in which a very simple class, say class is called <code>XXXX</code>, is defined. I have a <code>ex48_test.py</code> file containing some simple unit tests; in this test file if I do <code>from ex48.ex48 import XXXX</code> then everything works fine when the <code>ex48.py</code> file is in the sub-folder (<code>D:\LearnPython\projects\ex48\ex48</code>). </p>
  
  <p>Now what I don't understand is why it would give me an <code>Import Error: cannot import name XXXX</code> if I put the <code>ex48.py</code> in the main project folder e.g. (<code>D:\LearnPython\projects\ex48</code>) and do the import as <code>from ex48 import XXXX</code>.</p>
  
  <p>By the way, the test file (ex48_test.py) is in <code>D:\LearnPython\projects\ex48\tests</code> and I am running the tests using <code>nose</code> package.</p>