From: Ingo B. <ing...@we...> - 2006-02-28 17:32:07
|
#First, thanks to all the people alway answering me, especially marcelo and nitro! Hello, I have some C++ classes that I can wrap successfully into python. The corresponding methods are virtual, so Python tells me "unbound method". So far, so good. How can I provide these C++ methos within Python with Python-Code? I used the director=1 directive and declared a feature (even if I don't understand exactly what I did ;-) Furthermore, I made a sort of hopefully intelligent copy&paste out of the example file in the swig examples /extend directory and out of the test-suite. But, it is not working. I inherited a class and overwrote a virtual method, but a call returned "unbound method"... What can I do? Thank you very much! Best regards, Ingo ______________________________________________________________ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 |
From: Marcelo M. <mm...@ac...> - 2006-02-28 18:45:27
|
Check first the manual. The Python chapter has a section about directors. Also, there are more examples here SWIG/Examples/test-suite/directors*.i SWIG/Examples/test-suite/python/directors*_runme.py Marcelo Ingo Braun wrote: >#First, thanks to all the people alway answering me, especially marcelo and nitro! > >Hello, > >I have some C++ classes that I can wrap successfully into python. > >The corresponding methods are virtual, so Python tells me "unbound method". So far, so good. > >How can I provide these C++ methos within Python with Python-Code? > >I used the director=1 directive and declared a feature (even if I don't understand exactly what I did ;-) >Furthermore, I made a sort of hopefully intelligent copy&paste out of the example file in the swig examples /extend directory and out of the test-suite. > >But, it is not working. I inherited a class and overwrote a virtual method, but a call returned "unbound method"... > >What can I do? > >Thank you very much! > >Best regards, >Ingo >______________________________________________________________ >Verschicken Sie romantische, coole und witzige Bilder per SMS! >Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 > > > >------------------------------------------------------- >This SF.Net email is sponsored by xPML, a groundbreaking scripting language >that extends applications into web and mobile media. Attend the live webcast >and join the prime developer group breaking into this new coding territory! >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 >_______________________________________________ >Swig-user mailing list >Swi...@li... >https://lists.sourceforge.net/lists/listinfo/swig-user > > |