| #include <pybind11/embed.h> | |
| namespace py = pybind11; | |
| using namespace py::literals; | |
| int main() { | |
| py::scoped_interpreter guard{}; | |
| auto kwargs = py::dict("name"_a="World", "number"_a=42); | |
| auto message = "Hello, {name}! The answer is {number}"_s.format(**kwargs); | |
| py::print(message); | |
| } |