Creating Python Class Instances From C API
Fredrik Lundh
fredrik at pythonware.com
Tue Oct 12 11:24:02 EDT 1999
bill barrington <bill.barrington at turner.com> wrote:
> I would like to create a python class instance using the python/C
> API for eventual return back into "python space". IOW, I want to
> accomplish the equivalent of the following python code, but from within
> an extension:
>
> instance = Class(<whatever>)
start here:
http://www.python.org/doc/current/api/object.html
and then look at the cPickle.c source code
(see find_class, Instance_New, load_inst, ...).
</F>
coming soon:
http://www.pythonware.com/people/fredrik/librarybook.htm
More information about the Python-list
mailing list