from os.path import abspath x = abspath(__file__) import os y = os.path.abspath(__file__) from os import path z = path.abspath(__file__)