[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 05:25:45
|
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 *. AFAICS, I don't want to use def() because I don't want a function. I look at this http://mail.python.org/pipermail/cplusplus-sig/2010-February/015216.html and http://wiki.python.org/moin/boost.python/PeekUnderTheHood but the description to the details seems to have gone away. Thanks, Paul. |