Get Path of current Script

Alain Ketterlin alain at dpt-info.u-strasbg.fr
Mon Mar 14 05:53:25 EDT 2011


Alexander Schatten <aschatt at gmail.com> writes:

> could someone help me with a small problem? I wrote a Python script
> that does some RegEx... transformations. Now, this script loads some
> configuration data from a file located in the same directory:

sys.path[0] is the path to the directory containing the script that the
interpreter started with.

-- Alain.



More information about the Python-list mailing list