Jamieson Becker is the CEO of LabArts Corporation and
specializes in Internet-scale systems.
Sunday, October 19, 2008
Finding actual path of a python script
Python guru ironfroggy pointed out a quick way to pull the path of the module you are located in (aside from sys.modules['__main__'], which doesn't always work) is os.path.abspath(os.path.dirname(__file__)).
Post a Comment