how do i get the location of a python script code example Example: python how to get directory of script import os print(os.path.abspath(''))