Creating new Python types in C

rwgk at my-deja.com rwgk at my-deja.com
Sun Aug 13 01:21:01 EDT 2000


Using ExtensionClass is a great idea if you want to sub-class
your C classes, or if you want an easy way to "pickle" (e.g. save
to disk) instances of your C classes.

I am not sure why you think that most of the C API is
undocumented. The info at

http://www.python.org/doc/current/ext/ext.html
http://www.python.org/doc/current/api/api.html

is quite complete!

I very often use the "Extending and Embedding" chapter of
the "Python Essential Reference" by D.M. Beazley.
There are also two chapters on Extending and Embedding
in the O'Reillys "Programming Python" book. Another
possibility is http://www.manning.com/Harms/Contents.html.
I have yet looked at this book, though (just got it two
days ago).

Ralf


In article <8n47dn$na4$1 at slb6.atl.mindspring.net>,
  dkuhlman at netcom.com (G. David Kuhlman) wrote:
> You may want to read about extension classes at Digital Creation's
> site:
>
> http://www.digicool.com/releases/ExtensionClass/
>
>   - Dave
>
> Hookflash (hookflash at hotmail.com) wrote:
> > How do I create new types/classes in an extension written in C/C++
> > (i.e., a PyMyClass object that could be instantiated in python
using "mc
> > = myclass()")?  The Python Extending/Embedding docs don't really
cover
> > this, and most of the Python/C api seems practically undocumented
(Note:
> > I'm *not* complaining; I greatly appreciate the efforts put forth
by the
> > Python dev-team/community, but I simply don't have the skill to help
> > out).  Thanks for your time and help.
> >
> > Jordan
>


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list