Extending the python language

J

John D

I'm writing a class definition in python with some array atributes
from Numeric 2.0. I'm using UserArray, UserList, to subclass my
classes. But some of the methods I need to write in C mainly because
of computing speed. I need to pass to those C functions array and
lists objects that the C functions can access their contained values
like arrays and lists.
My question is that do I need to provide a python 'class' definition
to the C functions for those functions to be able to access these
subclassed classes and their attributes?
Is there software out there that can automate this particular
procedure?

Thanks,

John D.
 
S

Simon Burton

I'm writing a class definition in python with some array atributes
from Numeric 2.0. I'm using UserArray, UserList, to subclass my
classes. But some of the methods I need to write in C mainly because
of computing speed. I need to pass to those C functions array and
lists objects that the C functions can access their contained values
like arrays and lists.

PyRex is good at this. Have a look at the cgkit for an example.

Simon Burton.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top