[Tutor] Windows questions
Jeff Shannon
jeff at ccvcorp.com
Tue Sep 2 17:41:05 EDT 2003
Alan Gauld wrote:
>>The simplest way to do this is to include a file named python.pth in
>>your Python directory -- the filename itself doesn't matter, as long
>>as the extension is '.pth'. Each line of this file should contain a
>>directory name; every directory that's specified in that file will
>>be added to your sys.path, and thus searched for modules.
>
> Ooh, thats the first time I've seen this. (Sorry if I just haven't
> been
> paying attention!) When did this get added to Python?
> Has it always been there?
It's been there as long as I've been using Python -- since version 2.0
at least. At that point, $pythondir$\Lib\site-packages hadn't been
established as the standard place to put third-party packages, so
installation of things like PIL tended to require .pth files or the
like to allow them to be found (PIL installed its own PIL.pth file,
and probably many other packages did as well). It's not so necessary
any more, but still useful.
Jeff Shannon
Technician/Programmer
Credit International
More information about the Tutor
mailing list