how to find the directory where python is installed ?
Timothy Grant
timothy.grant at gmail.com
Thu Oct 2 15:28:25 EDT 2008
On Thu, Oct 2, 2008 at 12:16 PM, Stef Mientki <stef.mientki at gmail.com> wrote:
> hello,
>
> how can I determine the location of the Python installation under winXP /
> Linux,
> with a Python program ?
>
> thanks,
> Stef Mientki
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
This what you're looking for?
(tjg at bastard%) python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'/System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python'
>>> sys.path
['', '/Library/Python/2.5/site-packages/enum-0.4.3-py2.5.egg',
'/Library/Python/2.5/site-packages/mechanize-0.1.8-py2.5.egg',
'/Library/Python/2.5/site-packages/ClientForm-0.2.9-py2.5.egg',
'/Users/tjg/code/libs', '/Users/tjg/code/py-dist',
'/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5/site-packages',
'/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5/site-packages/wx-2.8-mac-unicode',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python25.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload',
'/Library/Python/2.5/site-packages',
'/usr/local/lib/wxPython-unicode-2.8.8.0/lib/python2.5',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC']
>>>
--
Stand Fast,
tjg. [Timothy Grant]
More information about the Python-list
mailing list