python get script execution directory code example Example: python how to get script directory import os print(os.path.abspath(''))