get location of python file code example
Example 1: python how to get directory of script
import os
print(os.path.abspath(''))
Example 2: get pyhton file path python
import os
os.path.realpath(__file__)
import os
print(os.path.abspath(''))
import os
os.path.realpath(__file__)