Set Pythonpath on NT/95/98 without Win32 extensions

Mark Hammond MHammond at skippinet.com.au
Fri May 14 20:51:07 EDT 1999


Guido van Rossum wrote in message <5l90ar7er1.fsf at eric.cnri.reston.va.us>...
>spamfranke at bigfoot.de (Stefan Franke) writes:
>
>> What about installing a .pth file in some directory of sys.path?
>
>Actually, on Windows, the .pth file should be in the toplevel Python
>installation directory, typically C:\Program Files\Python\.

And even then it doesnt always work :-(  This working is dependant on
sys.exc_prefix being set, and if Python is being embedded in another app it
isnt (mainly because in that case, the Python home directory is not easily
deducible) !  For example, if you attempt to use a .pth file to point to a
COM server, it wont be found as the host process usually is something other
than Python.

Mark.







More information about the Python-list mailing list