Re: [Rdkit-devel] boost.python C++ to python
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Paul E. <pau...@bi...> - 2012-06-05 07:09:06
|
On 05/06/12 07:28, Paul Emsley wrote: > > Hi, > > I have a different question. I am in the C++ world. I want to get to > the value returned by the python function default(mol) from the module > silicos_it.descriptors.qed. > > And to do that, I'm following this: > > http://www.codeproject.com/Articles/11805/Embedding-Python-in-C-C-Part-I > > I can get the PyObject * for the default() function. I need to load a > tuple for the argument list with a PyObject * representation of a > const RDKit::ROMol &. From what Ralf says, I need to construct a > boost.python object (how do I do that?) and use its ptr() function to > get a PyObject *. (To reply to myself) After yet more reading and tinkering, I see that boost::python::api::object(mol) seems to give me what I want... (maybe). Paul. |