Creating a new type with an extension module
Michael P. Reilly
arcege at shore.net
Tue Jun 22 15:43:12 CEST 1999
Sion Arrowsmith <siona at chiark.greenend.org.uk> wrote:
: In article <Ctp*vl52n at news.chiark.greenend.org.uk>,
: Sion Arrowsmith <siona at chiark.greenend.org.uk> wrote:
:>http://www.python.org/doc/current/api/newTypes.html is unhelpful
:>in the extreme -- do I have to resort to reading source?
: It appears that I do, but thanks to everyone who pointed me in
: the direction of suitably readable source. I've got what I
: wanted working -- it would just be nice to understand why it
Mark Lutz's _Programming Python_ book explains this quite well (I still
use these parts today in fact). He has two chapters on embedding and
But the documentation on extending Python is pretty well known
deficiency. Luckily it is far easier than most languages, both to
accomplish and to understand (yet more kudos to Guido). Actually, in
responce to your earlier posting, I started writing a _SHORT_ webpage
explaining what is needed, which I hope to have available later today.
I plan (and hope) to make it into a How-To later.
More information about the Python-list