Eryk Sun <[email protected]> added the comment:
> I'm not sure we ever meant for LoadLibrary("python3.dll") to
> actively load the concrete python3X.dll.
IIRC, Paul Moore was doing something like this to create a script runner that
loads "python3.dll", which runs as a regular application, not as a launcher for
"python.exe". He didn't want to tie the executable to a particular
"python3x.dll" or include the DLLs in the application directory beside the
executable. I think he had the embedded distribution(s) in a subdirectory.
That's solvable by defining an assembly in the subdirectory, which gets
declared in the application manifest. But I think he wanted to keep it simple.
So he was just manually loading "python3.dll" and calling GetProcAddress() to
look up Py_Main(), which works in Windows 8+. Alternatively, for this kind of a
script runner, the script itself can declare the version of Python it needs in
a shebang (assuming a single architecture for the executable and Python), and
the executable can then manually load the required Python DLL from a
subdirectory, or other known location.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue29399>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com