[python-win32] Modules installed in the Windows registry

Roger Upole rupole at hotmail.com
Sat Jul 28 21:11:35 CEST 2012


Amaury Forgeot d'Arc wrote:
> Hello,
>
> You probably know that Python3.3 has a completely new implementation
> of the import system:
> http://docs.python.org/dev/whatsnew/3.3.html#using-importlib-as-the-implementation-of-import
> (yes, import is now written in Python!)
>
> But there is a missing feature: it has always been possible to install
> Python modules in the Windows registry: "import foobar" would open
> the registry key "Software\Python\PythonCore\3.2\Modules\foobar"; if a
> file name is found there, it's used to import the module; this
> effectively bypasses the search in sys.path.
>
> I know that pywin32 used to install its modules this way in the old
> times.  Nowadays the same feature can be achieved differently, by
> using sys.meta_path for example.
>
> Is this feature still used?  Where?
> Is it acceptable to not support it anymore, and suggest developers to
> use a more modern method?
>
>
> -- 
> Amaury Forgeot d'Arc

Pywin32 hasn't used that feature for some time, and the installer goes
out of its way to remove any entries under that registry key that
might have been left over from an older version.  I haven't seen
any modules from other packages registered this way in ages.

   Roger





More information about the python-win32 mailing list