Michael R. Bernstein added the comment: And in case it isn't clear how such a method would help, here is what the earlier code would look like:
import os import site dirname = 'lib' dirpath = os.path.join(os.path.dirname(__file__), dirname) site.insertsitedir(1, dirpath) But (other than the imports) it could even be reduced to a one-liner: site.insertsitedir(1, os.path.join(os.path.dirname(__file__), 'lib')) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7744> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com