show current python path code example
Example 1: get path to current directory python
import os
os.path.abspath(os.getcwd())
Example 2: find python path windows
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
Example 3: python get path of current file
import pathlib
pathlib.Path(__file__).parent.absolute()