I have, for example, a varibale in c++:
const float Pi = 3.1415926535898f;
What is the best way to export it into python-module using boost.python?
I want to access it as variable in global scope.
Seems that it can be easily done using:
boost::python::scope().attr("Pi") = Pi;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With