title: Python error: AttributeError: 'module' object has no attribute
body: <p>I'm totally new to Python and I know this question was asked many times, but unfortunately it seems that my situation is a bit different...
  I have created a package (or so I think). The catalog tree is like this:</p>
  <pre><code>mydir
      lib   (__init__.py)
          mod1  (__init__.py, mod11.py)
  </code></pre>
  <p>In parenthesis there are files in the catalog. Both <code>__init__.py</code> files are zero length.</p>
  <p>The file <code>mydir/lib/mod1/mod11.py</code> contains the following:</p>
  <pre class="lang-py prettyprint-override"><code>def mod12():
      print &quot;mod12&quot;
  </code></pre>
  <p>Now, I run <code>python</code>, then <code>import lib</code>, which works OK, then <code>lib.mod11()</code> or <code>lib.mod12()</code>.</p>
  <p>Either of the last two gives me the subject error message. Actually <code>dir(lib)</code> after Step 2 does not display <code>mod11</code> or <code>mod12</code> either.
  It seems I'm missing something really simple.</p>
  <p>(I'm using Python 2.6 in Ubuntu 10.10)</p>
  <p>Thank you</p>