Hi Marc, Thanks for the suggestion,
On 27/09/2021 09:38, Marc-Andre Lemburg wrote:
Hi Robin, seeing that no one replied to your question, I'd suggest to ask this on the Python C-API ML: https://mail.python.org/mailman3/lists/capi-sig.python.org/ That's where the experts are, including the ones who implemented the mutli-phase logic. Cheers,
I think I have this working using ob=PyImport_GetModuleDict() followed by PyDict_GetItemString(ob,"modulename"), but I will ask there to see if there's a more direct route.
In Python >=3.7 there's PyImport_GetModule, but that seems more complex than is actually required for this simple case and has to wait until 3.6 dies for me :(
-- Robin Becker -- https://mail.python.org/mailman/listinfo/python-list