On 2005-05-11, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The following script demonstrates a method that should work for you. I > believe it is entirely cross-platform. > > #! /usr/bin/python > > import sys > import os > > print os.path.abspath(os.path.dirname(sys.argv[0]))
That will probably work most of the time, but... 1) you're not gauranteed that argv[0] contains the application path/filename. 2) the directory containing the executable is not where configuration files are supposed to be stored under Unix/Linux. -- Grant Edwards grante Yow! hubub, hubub, HUBUB, at hubub, hubub, hubub, HUBUB, visi.com hubub, hubub, hubub. -- http://mail.python.org/mailman/listinfo/python-list