Associating a C++ class with a Python class
Mahrt, Dallas
dallasm at aiinet.com
Fri Jun 14 16:20:32 EDT 2002
I would read the following link
http://www.python.org/doc/PyCPP.html
> -----Original Message-----
> From: jhndnn at yahoo.com [mailto:jhndnn at yahoo.com]
> Sent: Friday, June 14, 2002 4:13 PM
> To: python-list at python.org
> Subject: Associating a C++ class with a Python class
>
>
> I would like to add a new class type to my embedded python
> engine and I would like this class to wrap an exisiting C++
> class instance. All of the examples I have found are more 'c
> implementation' than 'c wrappers', meaning that the python
> instance is not associated with an different c++ class. The
> methods of the python class will just be straight calls
> through to the C++ class.
>
> These classes will only be created from C, so I am basically
> looking for a way to stuff a pointer to my C++ class into the
> python object. I guess I could have a map of PyObject->C++
> class, but I was hoping there was a cleaner way to accompish
> this task. Is there a standard way to do this? Am I missing
> something obvious?
>
> Thanks-
>
> John
> --
> John Dunn
> Peak Audio, a division of Cirrus Logic, Inc. http://www.peakaudio.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
More information about the Python-list
mailing list