python package find path code example
Example 1: find python path windows
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
Example 2: python get packages path
path = os.path.dirname(a_module.__file__)
>>> import os
>>> import sys
>>> os.path.dirname(sys.executable)
'C:\\Python25'
path = os.path.dirname(a_module.__file__)