get the path to the python command 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'