Extending the python language

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John D

    Extending the python language

    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.
  • Simon Burton

    #2
    Re: Extending the python language

    On Tue, 16 Sep 2003 15:49:21 -0700, John D wrote:
    [color=blue]
    > 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.[/color]

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

    Simon Burton.


    Comment

    Working...