title: How to refer to relative paths of resources when working with a code repository
body: <p>We are working with a code repository which is deployed to both  Windows and Linux - sometimes in different directories.  How should one of the modules inside the project refer to one of the non-Python resources in the project (CSV files, etc.)?</p>
  <p>If we do something like:</p>
  <pre><code>thefile = open('test.csv')
  </code></pre>
  <p>or:</p>
  <pre><code>thefile = open('../somedirectory/test.csv')
  </code></pre>
  <p>It will work only when the script is run from one specific directory, or a subset of the directories.</p>
  <p>What I would like to do is something like:</p>
  <pre><code>path = getBasePathOfProject() + '/somedirectory/test.csv'
  thefile = open(path)
  </code></pre>
  <p>Is it possible?</p>