Re: [Python-Dev] Py_Main() seems to be a NOOP

2017-08-10 Thread Patrick Rutkowski
On Thu, Aug 10, 2017 at 2:26 AM, Patrick Rutkowski <patrick.rutkow...@gmail.com> wrote: > I'm working on Windows with Python 3.6. I'm trying to make a wWinMain() GUI > application that uses an embedded python interpreter. I'm having various > issues with being unable to load ex

[Python-Dev] Py_Main() seems to be a NOOP

2017-08-10 Thread Patrick Rutkowski
I'm working on Windows with Python 3.6. I'm trying to make a wWinMain() GUI application that uses an embedded python interpreter. I'm having various issues with being unable to load extension modules, but I won't go into that now because I've tracked my issue down to a much simpler test case. To

Re: [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
g the crash to begin with because I was linking my Debug build with the release build python3.lib, since I thought it shouldn't matter. My problem is fixed now, but if anyone could sheld light on the details of why exactly it happened then I would certainy be interested. On Mon, Aug 7, 2017 at 8:11 P

Re: [Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
On Mon, Aug 7, 2017 at 8:44 PM, Larry Hastings wrote: > > My one idea: the GIL isn't initialized until you create a new thread. > That didn't seem to be it. I put a CreateThread() call right after Py_Initialize(), and that didn't fix it. I also moved it around to before

[Python-Dev] PyThreadState_GET() returns NULL from within PyImport_GetModuleDict()

2017-08-07 Thread Patrick Rutkowski
I'm working on Windows. I have the following dead simple embedding code that I'm using to test out the python interpreter: Py_SetProgramName(L"MyApp"); Py_SetPath(