From: Barry S. <ba...@ba...> - 2008-07-06 09:50:43
|
On May 18, 2008, at 16:57, Sven Alisch wrote: > Hi members! > > I am new to this list, so sorry for my bad english. I hope you > understand me. > > First of all: Thanks for your great and well documented project. It > is very > simple to start programming a wrapper. I tried a little bit and it > works. > > Now I want to do following. I want to program a callback function. > This means > I want to give my C++-Methods a Python-Function (like a c function > pointer). > Then I want to call this Python-Function like a callback-function > in C. But > how to do this? Could anybody be so sind to give me a hint? Sorry for the long time in replying... Do you want to call python code from C++? Create a Py::Callable object and use its apply() method to call the python code. The pysvn project uses pycxx and uses a lot of its features. Its project page is http://pysvn.tigris.org. It may have examples that an useful to you. Barry |