and just use PyShell as is. I tried the embedded.cpp sample, but it
>> exits with this (current CVS, GTK 1.2)
>>
>> [New Thread 16384 (LWP 19760)]
>> Fatal Python error: PyEval_RestoreThread: NULL tstate
>Thanks, I'll check into this.
I mentioned that if you put the Py_Finalize() in OnExit you don't get an error. This is not true, you don't get the error when you close the frame by clicking on the frame's close button so that OnExit is not run, valgrind says that you leak 6Mb so this is not a solution at all. If you exit the program with the menu item to run OnExit you get the same error.
The actual problem seems to be here, if you change DoPythonStuff to this you don't get an error.
wxWindow* MyFrame::DoPythonStuff(wxWindow* parent)
{
return new wxWindow(parent, -1);
So I guess that DoPythonStuff is to blame. Unfortunately it looks like black magic to me, but I will try to look into it.
Sorry no answers, but I think this narrows the scope of the problem a bit.
Regards,
John Labenski