Brett Cannon <br...@python.org> added the comment:

So it should end up in Lib/importlib/_bootstrap.py since it is directly part of 
how import works. The original code as found in Python 3.2 for 
PyWin_FindRegisteredModule() is referenced in Python/import.c and is 
implemented in PC/import_nt.c. You will want to create a new sys.meta_path 
importer (if I'm reading the code from Python/import.c correctly in terms of 
the call to PyWin_FindRegisteredModule() happening before sys.path is 
traversed). You can refactor FileFinder if you need to in order to reuse its 
code.

In terms of working with importlib, you will probably need the winreg module, 
so inject that (see _setup() on how to do that). Also remember that while this 
is Python code, you will need to rebuild to trigger the regeneration of 
importlib.h. Otherwise (I hope) it isn't too complicated or hard to understand.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14578>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to