How do I get the current path of a project in Python?
<p>Is there a way to find out the path of a current project in a subfolder?</p>

<p>If I have for instance something like:</p>

<pre><code>/
    main.py
    /utils
        utilities.py
    /foo
        foo.py
        /foo/bar
           bar.py
</code></pre>

<p>While coding in <code>/foo/foo.py</code> or in <code>/foo/bar/bar.py</code> I want to include the "utilities" module located at <code>/utils/utilities.py</code> How can I do this by calling some sort of relative path to the project and then just import this helper module?</p>

<p>I am able to retrieve the path of a file being executed with:</p>

<pre><code>os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0]))
</code></pre>

<p>But what I need is the relative or absolute path of the current project.</p>

<p>Thanks in advance.</p>
