defining class

Chris Gonnerman chris.gonnerman at usa.net
Fri Jan 26 08:47:00 EST 2001


----- Original Message -----
From: "Aleksei Guzev" <aleksei.guzev at bigfoot.com>
> I'm sure I don't understand something since I can't find an article
> on creating a class object from a C or C++ module.

That's because it isn't easy, AFAIK.  Check out the Boost Python Library at
http://www.boost.org/libs/python/doc/index.html; on the page on writing
extensions they say:

> Another obstacle that most people run into eventually when extending
Python is that there's no
> way to make a true Python class in an extension module.

Further down you are referred to a page about Python's metaclass feature.
There they actually explain how you can do what you want to do.  For
reference, the URL of that page is:

http://www.python.org/doc/essays/metaclasses/

It about burned out my brain though.






More information about the Python-list mailing list