[docs] [issue12648] Wrong import module search order on Windows

Nick Coghlan report at bugs.python.org
Sun Jul 31 10:20:33 CEST 2011

Nick Coghlan <ncoghlan at gmail.com> added the comment:

The Windows build actually uses the registry to locate the standard library rather than sys.path. This is by design, but isn't really documented properly.

It means that code on sys.path (even in the current directory) won't shadow standard library modules on Windows.

Due to various arcane details about how it is implemented, the emulation of the main import system that is used to run code with the '-m' switch gets the search order the other way around and hence gives a different answer (the same answer as Linux) in cases like this.

assignee:  -> docs at python
components: +Documentation -None
nosy: +docs at python

Python tracker <report at bugs.python.org>

More information about the docs mailing list