Hi,

I have embedded Stackless Python 2.6.1 into a C++ application of mine. At 
certain points in the application I would like to 're-init' Python to clean 
things up without having to shutdown and re-launch my application. First time 
initializing Python works fine. I encounter a crash though when trying to 
initialize Python a second time.

I am doing something like the following:

if (!Py_IsInitialized())
{
    Py_SetProgramName( /* some name */ );
    Py_Initialize();
}

// ...do some app stuff...

// ...and at some point...

if (Py_IsInitialized())
{
    // Try to re-initialize python
    Py_Finalize();
    Py_SetProgramName( /* some name */ );

    Py_Initialize();  // <--- Crashes here
}

I did some searching and found that I am having the same problem as described 
in these links:

http://bugs.python.org/issue1306
http://osdir.com/ml/python.stackless/2006-03/msg00023.html

Does anyone know if this issue has been addressed in Stackless Python 3.0? I 
would like to use v3.0, but chose v2.6.1 due to the warnings about bugs in v3.0.

Thank you, I appreciate it.

Mark

P.S. Sorry if this subject has already been discussed. I searched the list, but 
found no results.

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to