python get path to script code example
Example 1: python get script path
os.getcwd()
Example 2: python how to get directory of script
import os
print(os.path.abspath(''))
Example 3: get path from file path python
>>> import os
>>> os.path.split(os.path.abspath(existGDBPath))
('T:\\Data\\DBDesign', 'DBDesign_93_v141b.mdb')