Hi,
I'm writing a C++ library which I want to optionally export for use in Python using Py++.
Is there an easy way to convert Python objects back to their original c++ counterparts?
i.e.
void setPosePython(boost : : python : : object pose)
{
setPose(boost : : python : : extract <core : : pose : : Pose & >(pose));
}
Thanks!
Looks like this was due to a boost incompatibility.
PyRosetta includes a version of boost_python in the rosetta dir.
Relinking this to your system version of boost_python should do the trick.
In my case:
mv ./libboost_python-mt-py26.so.1.38.0 libboost_python-mt-py26.old &&
ln -sf /usr/lib/libboost_python-mt-py26.so libboost_python-mt-py26.so.1.38.0
This insures that conversion and extraction is properly registered globally.
The above code is no longer necessary, just use:
void setPosePython(core : : pose : : Pose &p)
{
...
}
directly.