title: Import module from child folder instead of same directory?
body: <p>So I have the following file structure (win10)</p>
  <pre><code>project/
          mycode.py
          lib/
             bunch of python modules
             paramiko/
                      all of paramiko's files
  </code></pre>
  <p>Here, all the modules are in a child folder, and when I say
  <code>import paramiko</code> in mycode.py, it can't find paramiko. However, when I move them all out of the lib directory, it works fine.</p>
  <p>Working solution:</p>
  <pre><code>project/
          mycode.py
          bunch of python modules
          paramiko/
                   all of paramiko's files
  </code></pre>
  <p>But it's ugly, and I'd rather have all of them in a lib directory. How do I access modules in a child directory?</p>
  <p>Edit: Okay, figured it out. I used os. to add to the path:</p>
  <pre><code>projectPath = os.path.dirname(os.path.abspath(__file__))
  sys.path.append(projectPath+&quot;\\lib&quot;)
  </code></pre>
  <p>which I had tried before, except this time, <strong>i moved the import paramiko to after the edits made to the path</strong>. God I feel stupid sometimes</p>