Get the executing file's path from an installed package?
<p>If one installs a python package using setuptools, then executes a method in that package from a standard python script, is it possible to get the file path of the calling/executing file?</p>

<p>For instance, the file I'm executing is <code>/usr/foo/bar.py</code>, which looks like this:</p>

<pre><code>import baz
baz.get_current_path()
# should print /usr/foo/bar.py
</code></pre>

<p>and the package <code>baz</code> has been installed using setuptools and is located in that magical place all python packages are installed when they've been good little packages.</p>

<p>Both <code>__file__</code> and <code>import inspect; inspect.currentframe().f_code.co_filename</code> return the path of the package'd file.</p>

<p>Is this possible?</p>
