[C++-sig] Re: Presenting a Python embedding tutorial

Charsley, Mark Mark.Charsley at radioscape.com
Wed Dec 11 14:37:24 CET 2002

> > That contains a dangerous flaw - it supposes that 
> PyInitialize hasn't been
> > called by anyone else, using code other than boost::python. 
> Which means that
> > code running in a boost::python extension can't create a 
> sub-interpreter
> > using boost::python. I strongly advise using 
> Py_IsInitialized() instead of a
> > static count in a C++ class.
> Right. Good point. But how do you propose to fix the destructor?

A variation on this (a minimal Embedding class we developed here before
boost::python v2)?

        m_weControlPython = false;
        m_weControlPython = true;

    if (m_weControlPython)


This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster at radioscape.com.

This footnote also confirms that this email message has been scanned
for the presence of computer viruses known at the time of sending.


More information about the Cplusplus-sig mailing list