pth files - can they prepend to sys.path?

Michael Hudson mwh at python.net
Fri Dec 28 11:00:21 EST 2001


"Skip Montanaro" <skip at pobox.com> writes:

> Is it possible to force a directory mentioned in a .pth file to be
> inserted at the beginning of sys.path instead of appended to the
> end?

You realise the handling of .pth files is done in site.py?

The answer seems to be no, though presumably there's nothing stoppoing
you supporting .pthplus files in a sitecustomize.py.

Cheers,
M.



More information about the Python-list mailing list