"Robert Brewer" <fumanchu at amor.org> writes: > Shorter version for the local directory: > > import os.path > localDir = os.path.dirname(__file__) Note that __file__ isn't set for top level scripts prior to Python 2.3, so if you need to support older versions you may want to try the __file__ access and fall back to argv[0] if its not available. -- David