>>> import os>>> homedir = os.getcwd()>>> print homedirD:\python\test>>>>>> import sys>>> print sys.argv[0]D:\python\test\temp.py>>> print os.path.abspath(sys.argv[0])D:\python\test\temp.py>>>