[C++-sig] Creating a python class from c++

James Healey healeyjames at yahoo.co.uk
Sun Nov 12 16:30:09 CET 2006


Can any body tell me how you create a python class
from within c++?

so in my .py file I have 

class MyClass:
   def f(self):
      return 'hello world'


And from my c++ code i want to be able to do....

x = new MyClass
x.f()

oh and im using boost as well, if that makes it any
easier.

Regards.
Jimmy.


		
___________________________________________________________ 
Inbox full of spam? Get leading spam protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html



More information about the Cplusplus-sig mailing list