see python path windows code example
Example: find python path windows
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'