Get location of the .py source file
<p>Say I have a python file in directory <strong>e</strong> like this:</p>

<p><em>/a/b/c/d/e/file.py</em></p>

<p>Under directory <strong>e</strong> I have a few folders I want to access but if file.py is executed from anywhere else rather than from folder <strong>e</strong> the relative path won't work for me. Also folder <strong>e</strong> could be located anywhere but always with the a set of sub folders so absolute path will not work.</p>

<p>First, is there any function to get the absolute path in relation to the source files location?</p>

<p>If not, any ideas how to sort this out? Grab the command line used and add the CWD together?</p>

<p>My problem here is that this folder are being installed on 20 different machines and OS's and I want it to be as dynamic as possible with little configurations and "rules" where it has to be installed etc.</p>
