[issue12648] Wrong import module search order on Windows

2013-01-25 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12648] Wrong import module search order on Windows

2011-07-31 Thread kota
kota added the comment: Ok. Time to get those people over at glib to fix up their python script then :) -- ___ Python tracker ___ ___

[issue12648] Wrong import module search order on Windows

2011-07-31 Thread Nick Coghlan
Nick Coghlan added the comment: As far as I know, not as a top-level module in an installed version of Python (at least, not without mucking about in the registry). Shadowing standard library modules is generally a bad idea, and this is one of the reasons. -- ___

[issue12648] Wrong import module search order on Windows

2011-07-31 Thread kota
kota added the comment: So there isn't any way to load parser.py via import parser on Windows? -- components: +None -Documentation ___ Python tracker ___ ___

[issue12648] Wrong import module search order on Windows

2011-07-31 Thread Nick Coghlan
Nick Coghlan 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 Wi

[issue12648] Wrong import module search order on Windows

2011-07-31 Thread kota
kota added the comment: Yea, it runs the parser.py that time. And I didn't understand the page you linked me to. Would you mind explaining it a bit? -- ___ Python tracker ___ _

[issue12648] Wrong import module search order on Windows

2011-07-30 Thread Nick Coghlan
Nick Coghlan added the comment: It's actually the documentation that's slightly wrong in this case. On Windows, there is an additional import mechanism based on the Windows registry that is checked before the ordinary sys.path mechanism. (See http://docs.python.org/library/pkgutil#pkgutil.ite

[issue12648] Wrong import module search order on Windows

2011-07-29 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +brett.cannon, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue12648] Wrong import module search order on Windows

2011-07-28 Thread kota
New submission from kota : There seems to be a wrong import module search order (http://docs.python.org/tutorial/modules.html#the-module-search-path) on Windows. Python seems to be loading the built-in module instead of the python code with the same name as the module in the current directory.