#include <embed.h>
Public Member Functions | |
scoped_interpreter & | operator= (const scoped_interpreter &)=delete |
scoped_interpreter & | operator= (scoped_interpreter &&)=delete |
scoped_interpreter (bool init_signal_handlers=true) | |
scoped_interpreter (const scoped_interpreter &)=delete | |
scoped_interpreter (scoped_interpreter &&other) noexcept | |
~scoped_interpreter () | |
Private Attributes | |
bool | is_valid = true |
Scope guard version of initialize_interpreter
and finalize_interpreter
. This a move-only guard and only a single instance can exist.
.. code-block:: cpp
#include <pybind11/embed.h> int main() { py::scoped_interpreter guard{}; py::print(Hello, World!); } // <-- interpreter shutdown
|
inline |
|
delete |
|
inlinenoexcept |
|
delete |
|
delete |