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.
Michael R. Bernstein added the comment:
The lack of a left-append option for site.addsitedir(path), or an
site.insertsitedir(index, path) (which is what I would consider a better
solution), causes quite a few contortions on some hosted platforms, notably
Google App Engine, for vendored