how to get python path in python program code example Example: get pyhton file path python import os os.path.realpath(__file__)