title: python: Cannot access files in directory at the same level
body: <p>File structure:</p>
  
  <pre><code>packagedir
     |
     |-configdir
         |
         |-cmd1.yaml
         |-cmd2.yaml
     |
     |-main.py
  </code></pre>
  
  <p>from main.py file I would like to read some yaml files in configdir, the program doesn't find them:</p>
  
  <pre><code>import os.path
  
  cmdfile = os.path.join(os.path.dirname('__file__'), '../configdir', 'cmd1.yaml')
  
  try:
      stream = open(cmdfile)
      rdata = yaml.load(stream)
      if self.rdata:
          for cmd in value[6:len(value)+1]:
              print cmd
      else:
              logging.debug('File ',cmdfile,' is empty')
  except IOError:
      print 'File ',cmdfile,' NOT found'
  </code></pre>
  
  <hr>
  
  <p>The outcome:</p>
  
  <blockquote>
    <p>File  ../config/INTERNET-cmd.yaml  NOT found</p>
  </blockquote>
  
  <p>Any hint?</p>