How to call a python function in C++

clio wangye1 at auburn.edu
Sun Oct 7 23:13:05 EDT 2001


Thank you for your help.

I did not add the my_set_callback in method table. But now I can not 
access my_callback in python. The error like this:

 >>> import provapi
Diffusion Routing Agent: Initializing... Agent ID = 32792
 >>> def happy(binstr): print binstr
...
 >>> provapi.set_callback(happy)
 >>> print provapi.my_callback
Traceback (innermost last):
   File "<stdin>", line 1, in ?
AttributeError: my_callback
 >>> print happy
<function happy at 80d99e8>
 >>>

It seems that set_callback doesn't work. But I don't know why?

Thank you again.

clio




More information about the Python-list mailing list