Hi Ian On 25 Oct 2002, Ian Bicking wrote: > Another feature that would be nice would be avoiding checking Python > standard libraries. On Unix that will generally be files starting in > /usr/lib/pythonX.X -- but that's obviously not general, even on Unix. > I'm not sure how to identify that directory. It might be > os.path.join(sys.prefix, 'lib/python%i.%i' % (sys.version_info[0], > sys.version_info[1])).
Perhaps it's best to use the distutils package: >>> import pprint >>> from distutils import sysconfig >>> pprint.pprint(sysconfig.get_config_vars()) This prints a lot of settings which might be interesting. Among them are 'BINLIBDEST': '/usr/local/lib/python2.2', 'DESTDIRS': '/usr/local /usr/local/lib /usr/local/lib/python2.2 /usr/local/lib/python2.2/lib-dynload', 'DESTLIB': '/usr/local/lib/python2.2', 'DESTSHARED': '/usr/local/lib/python2.2/lib-dynload', 'LIBDEST': '/usr/local/lib/python2.2', 'LIBP': '/usr/local/lib/python2.2', However, I don't know the difference between DESTLIB and LIBDEST ;-/ , maybe they are documented somewhere. You can get individual variables with >>> sysconfig.get_config_var('LIBDEST') '/usr/local/lib/python2.2' Stefan ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en _______________________________________________ Webware-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-devel