Linux/Win32 func. to get Python instdir (not exedir) + site-packages => extensions mgmt

pythonewbie eproust at gmail.com
Sun Jan 20 06:03:41 EST 2008


Hi all,

I am newbie in Python, my wish would be to create python applications
for both Linux/Win32.

I am stucked on creating a function to get the Python install
directory (and site-packages directory) with a 100% reliable method...

My goal is to verify if an/several extension(s) are installed and to
automatically install the missing ones on Linux or Win32.

I have tested sys.executable and sys.path, but I am not sure to be
able to get what I need on different versions of Python and different
platforms.

Google was not a good friend on this, so I am very interested on how
you implement such a function.

Cheers.



More information about the Python-list mailing list