[issue32516] Add a shared library mechanism for win32

Marc-Andre Lemburg report at bugs.python.org
Wed Jan 17 03:35:43 EST 2018


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 17.01.2018 02:52, xoviat wrote:
> 
> xoviat <xoviat at gmail.com> added the comment:
> 
> For the record, moving the DLL path manipulation code into the interpreter would address the concern that importing a module would not manipulate the search path because the behavior would move into Python itself.

Can't you simply place the DLLs into the PythonXX\DLLs\ directory ?

That's where Python itself keeps external DLLs (and several PYDs)
and it won't change after installation of Python.

Or create a special container package on PyPI into which you place
the DLLs and add dependencies to this in all other packages.

You can then load the DLL via win32 LoadLibrary either using the
Python win32 tools or ctypes:

https://docs.python.org/3.7/library/ctypes.html
http://timgolden.me.uk/pywin32-docs/win32api__LoadLibrary_meth.html
https://www.programcreek.com/python/example/51388/win32api.LoadLibrary

FWIW: I think this ticket has shown plenty options to possible
solutions, including many which do not manipulate the path.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32516>
_______________________________________


More information about the Python-bugs-list mailing list