title: Strange Python Import Error
body: <p>I am new to Python. I am getting ImportError and seem to have tried everything that's in the documentation and the various notes in this site and other</p>
  
  <p>My code is structured as follows:</p>
  
  <pre><code> vsm
   |
   |______bin
   |      vsmx.py
   |______site-packages
            __init__.py
          |
          |_____libs
               __init__.py
               monitor.py
  </code></pre>
  
  <p>In monitor.py I have a function named getStr and the two <code>__init__.py</code> files are empty</p>
  
  <p>I have the PYTHONPATH set to vsm/site-packages &amp; vsm/site-packages/libs. When I run from command line,  python bin/vsmx.py, I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "bin/vsmx.py", line 15, in &lt;module&gt;
      from libs.monitor import getStr
     File "/var/src/vsm/bin/vsmx.py", line 15, in &lt;module&gt;
       from libs.monitor import getStr
  ImportError: No module named monitor
  </code></pre>
  
  <p>However, when I try to run this interactively, it seems to work. I tried on both windows and linux using python 2.6.1. </p>
  
  <p>Any pointers will be much appreciated</p>