I am not familiar with boost python per se but it sounds like it offer similar facility as PyROOT itself (i.e. give you a way to access your C++ code from python).
To take advantage of this feature you need to generate (via rootcint or genreflex) a dictionary for your C++ entities (functions, classes), compile and link into your shared library and simply load that shared library into your python session.
The simpliest way of doing this is to use ACLiC (for example directly from python):gROOT.LoadMacro( "myroot.C+" )
in the code above you’re expecting boost.python to know about PyROOT objects, but of course it does not. Either write your own custom converter for it, or passing it as a CObject may work already:cobj_tree = ROOT.AsCObject( tree )
myroot.printTree( cobj_tree )