getting the directory of the python file im running code example Example: python how to get directory of script import os print(os.path.abspath(''))