[issue43022] Unable to dynamically load functions from python3.dll

Steve Dower report at bugs.python.org
Mon Jan 25 15:49:02 EST 2021


Steve Dower <steve.dower at python.org> added the comment:

> I wonder whether it would be worth having a section in the docs somewhere explaining how to do this, or more generally what the "best practices" are for embedding?

Yes, it would be great. I think there are a few pieces in Doc/using/windows.rst already, and maybe a few bits in the embedding/extending section, but more would be valuable here.

> If I were to try to put something together, would that be worthwhile?

It would give us something concrete to argue about, at least ;) Speaking of arguing...

(Earlier post)
> The reason I want to use the stable ABI is so that I can upgrade the embedded distribution without needing to rebuild the C code.

I think here you're in a very small minority who could get away with this, and so I'd hesitate to make it sound like the recommended approach.

What I'd actually recommend (on Windows) is to bundle a copy of Python with your application. The embeddable distro is specifically for this purpose, and once you've done that then there's no need to worry about the version changing at all (unless you do it yourself).

What's missing *here* is any kind of guide or walkthrough on how to do it. I think I imagined that I'd have the time and inclination to do some myself, but obviously I never have. Ultimately, I'd definitely be suggesting "just fix your Python version and load it directly" for embedders, so probably wouldn't have helped with what you're trying to do here anyway, Paul.

----------

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


More information about the Python-bugs-list mailing list