You are here

Boost.Python C++/PyRosetta interop

2 posts / 0 new
Last post
Boost.Python C++/PyRosetta interop


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?


void setPosePython(boost : : python : : object pose)


setPose(boost : : python : : extract <core : : pose : : Pose & >(pose));



Wed, 2010-10-06 15:15

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.old &&
ln -sf /usr/lib/

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)


Thu, 2010-10-14 12:41