> But for different reasons I also want to get the absolute path of > Python install directory (not only the executable under Linux) and > site-packages directory.
The Python install directory is available as sys.prefix. The site-packages directory is sys.prefix+"lib/python"+x.y+"/site-packages (where x.y is from sys.version_info). HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list