resonance 1.0.1
Loading...
Searching...
No Matches
PyInterpreter Class Reference

Lifetime of the embedded interpreter, the first member of PyShell. More...

#include <pyinterpreter.h>

Public Member Functions

 PyInterpreter ()
 Start the interpreter without importing site.
 ~PyInterpreter ()
 Shut the interpreter down.
 PyInterpreter (const PyInterpreter &)=delete
PyInterpreter & operator= (const PyInterpreter &)=delete

Detailed Description

Lifetime of the embedded interpreter, the first member of PyShell.

The class has no data, and its only effect is its constructor and destructor. As PyShell's first member it is constructed before the namespace dictionary and destroyed after it. The dictionary cannot be created until the interpreter is up, and it is released before the interpreter shuts down. PyShell() at 0x005072e8 sets Py_NoSiteFlag and calls Py_Initialize() before it builds the dictionary, and ~PyShell() at 0x0050d480 calls Py_Finalize() after it releases the dictionary. Member construction and destruction give the same order. The class is inlined into both and has no RTTI. The name is inferred.

Constructor & Destructor Documentation

◆ PyInterpreter() [1/2]

PyInterpreter::PyInterpreter ( )

Start the interpreter without importing site.

◆ ~PyInterpreter()

PyInterpreter::~PyInterpreter ( )

Shut the interpreter down.

◆ PyInterpreter() [2/2]

PyInterpreter::PyInterpreter ( const PyInterpreter & )
delete

Member Function Documentation

◆ operator=()

PyInterpreter & PyInterpreter::operator= ( const PyInterpreter & )
delete

The documentation for this class was generated from the following file: