get the path of the python file that is running code example Example: get pyhton file path python import os os.path.realpath(__file__)