Python: get path to file in sister directory?
<p>I have a file structure like this:</p>

<pre><code>data
   mydata.xls
scripts
   myscript.py
</code></pre>

<p>From within myscript.py, how can I get the filepath of mydata.xls?</p>

<p>I need to pass it to xlrd:</p>

<pre><code>book = xlrd.open_workbook(filename)
</code></pre>

<p>and relative filepaths like '../data/mydata.xls' don't seem to work. </p>
