\rst Scope guard version of initialize_interpreter
and finalize_interpreter
.
More...
#include </builds/ipbus/ipbus-software/uhal/python/pybind11-python2/include/pybind11/embed.h>
Public Member Functions | |
scoped_interpreter (bool init_signal_handlers=true, int argc=0, const char *const *argv=nullptr, bool add_program_dir_to_path=true) | |
scoped_interpreter (const scoped_interpreter &)=delete | |
scoped_interpreter (scoped_interpreter &&other) noexcept | |
scoped_interpreter & | operator= (const scoped_interpreter &)=delete |
scoped_interpreter & | operator= (scoped_interpreter &&)=delete |
~scoped_interpreter () | |
scoped_interpreter (bool init_signal_handlers=true, int argc=0, const char *const *argv=nullptr, bool add_program_dir_to_path=true) | |
scoped_interpreter (PyConfig *config, int argc=0, const char *const *argv=nullptr, bool add_program_dir_to_path=true) | |
scoped_interpreter (const scoped_interpreter &)=delete | |
scoped_interpreter (scoped_interpreter &&other) noexcept | |
scoped_interpreter & | operator= (const scoped_interpreter &)=delete |
scoped_interpreter & | operator= (scoped_interpreter &&)=delete |
~scoped_interpreter () | |
Private Attributes | |
bool | is_valid = true |
\rst Scope guard version of initialize_interpreter
and finalize_interpreter
.
This a move-only guard and only a single instance can exist.
See initialize_interpreter
for a discussion of its constructor arguments.
.. code-block:: cpp
#include <pybind11/embed.h> int main() { py::scoped_interpreter guard{}; py::print(Hello, World!); } // <-- interpreter shutdown
\endrst
|
inlineexplicit |
Definition at line 280 of file embed.h.
References initialize_interpreter().
|
delete |
|
inlinenoexcept |
|
inline |
Definition at line 292 of file embed.h.
References finalize_interpreter(), and is_valid.
|
inlineexplicit |
Definition at line 286 of file embed.h.
References initialize_interpreter().
|
inlineexplicit |
Definition at line 294 of file embed.h.
References initialize_interpreter().
|
delete |
|
inlinenoexcept |
|
inline |
Definition at line 307 of file embed.h.
References finalize_interpreter(), and is_valid.
|
delete |
|
delete |
|
delete |
|
delete |
|
private |
Definition at line 299 of file embed.h.
Referenced by ~scoped_interpreter().