Boost.Python C++/PyRosetta interop

Member Site Forums PyRosetta PyRosetta – General Boost.Python C++/PyRosetta interop

Viewing 1 reply thread
  • Author
    • #681


        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));



      • #4645

          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)



      Viewing 1 reply thread
      • You must be logged in to reply to this topic.