Ant wrote: > Do you mean the folder containing the script? Or the current > working directory? > > If the former, then look at os.path.split(sys.argv[0])[0]
test.py: | #!/usr/bin/env python | import sys,os | print os.path.split(sys.argv[0])[0] $ cd tmp ~/tmp$ ../test.py .. ~/tmp$ That's rather not what's intended. I'd try os.path.abspath(__file__) instead. Regards, Björn -- BOFH excuse #113: Root nameservers are out of sync -- http://mail.python.org/mailman/listinfo/python-list