import sys, osprint 'sys.argv[0] =', sys.argv[0]pathname = os.path.dirname(sys.argv[0])print 'path =', pathnameprint 'full path =', os.path.abspath(pathname)