sys.path ordering question
mhammond at skippinet.com.au
Wed Dec 19 12:38:57 CET 2001
Kerim Borchaev wrote:
> Could someone explain the paths ordering logic used to create sys.path
> listed below?
> Why win32 extensions are before standard python paths but Numeric and other
> (I know this ordering makes sense - it's how modules are searched.
Paths before the standard paths come from either the registry or PYTHONPATH.
Then .pth files are used, and their paths *appended*, yielding the
results you see.
> And in fact I'm asking this to get guidelines how should I arrange
> my own packages.)
Use a .pth file like these packages do. This is really what the Win32
extensions should do too.
More information about the Python-list