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