python get the path from where you call the script code example
Example 1: python get script path
os.getcwd()
Example 2: python file location path
import os
print('getcwd: ', os.getcwd())
print('__file__: ', __file__)
os.getcwd()
import os
print('getcwd: ', os.getcwd())
print('__file__: ', __file__)