How to import modules from different folders in Python?
<p>How to import modules from different folders? I have the following</p>

<pre><code>cgi-bin
       | py
          |
           __init.py__
           http
             |
              __init.py__
              HttpFormParser.py
           xml
             |
              __init.py__
              XmlDocumentCreator.py
</code></pre>

<p>I want to import XmlDocumentCreator in HttpFormParser.py. How to do that ?</p>

<p>I'm doing</p>

<pre><code>import py.xml.XmlDocumentCreator
</code></pre>

<p>in HttpFormParser.py and its throwing the following error.</p>

<pre><code>/HttpFormParser.py", line 5, in &lt;module&gt; 
    import py.xml.XmlDocumentCreator
ImportError: No module named py.xml.XmlDocumentCreator
</code></pre>
