title: I/O Error:Cannot open resource, while importing python file from the different directory
body: <p>I'm generating pdf using ReportLab. But when i'm trying to attach image in it, it gives error. If i'm not including image then everything is fine. code runs successfully.</p>
  
  <p>I have the following directory structure.</p>
  
  <pre><code>parentDir\
     main.py
     childDir\
         __init__.py
         first.py
         second.py
         image.jpg
  </code></pre>
  
  <p>main.py</p>
  
  <pre><code>from childDir.first import methodOfFirst
  
    #using methodOfFirst
  </code></pre>
  
  <p>first.py</p>
  
  <pre><code>from second import methodOfSecond
  
     #using methodOfSecond
  </code></pre>
  
  <p>second.py</p>
  
  <pre><code>#this second.py file have **ReportLab** Code
     .............
     canvas.drawImage('image.jpg', 0.2*inch, 11.12*inch, width=w*scale, height=h*scale)
     .............
  </code></pre>
  
  <p>This is the basic skeleton of my code. But when i'm executing, it generates the error:</p>
  
  <pre><code>raise IOError('Cannot open resource "%s"' % name)
   IOError: Cannot open resource "tjsservices.jpg"
     handle_pageBegin args=()
  </code></pre>
  
  <p>I'm new to python and reportLab so don't know what is the correct way to import such a kind of hierarchy. If all the files are in same directory then it works fine. but when i'm using such a kind of directory structure, it fails.</p>
  
  <p>Just for the simplicity, i had provided this skeleton. Let me know if more code is needed.</p>
  
  <p>So the question is. Why i'm getting this error and how to resolve it? is this the issue of ReportLab (i.e. this kind of importing is not supported by reportLab) or i'm importing files wrong way ?
  Any help would be greatly appreciated. </p>