Creating a python object in C++ and calling its method
<p>In the following document about python embedding, it is well described how to embed python methods in &quot;C&quot; code.
<a href="https://docs.python.org/3/extending/embedding.html" rel="nofollow noreferrer">https://docs.python.org/3/extending/embedding.html</a></p>
<p>I tested the above code, it works well with the GCC g++ compiler as well.</p>
<p>But the above shows examples of calling the global methods not the class methods.</p>
<p>Could anyone show an example about how to create a Python object and call its method from C++?</p>