Extending the python language

Discussion in 'Python' started by John D, Sep 16, 2003.

  1. John D

    John D Guest

    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.
     
    John D, Sep 16, 2003
    #1
    1. Advertising

  2. John D

    Simon Burton Guest

    On Tue, 16 Sep 2003 15:49:21 -0700, John D wrote:

    > 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.
     
    Simon Burton, Sep 17, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ed
    Replies:
    24
    Views:
    1,009
    Dimitri Maziuk
    Mar 27, 2006
  2. Johannes Zellner
    Replies:
    1
    Views:
    338
    Fredrik Lundh
    Jan 18, 2006
  3. Kiran
    Replies:
    5
    Views:
    291
    Kiran
    Oct 26, 2006
  4. Kiran
    Replies:
    3
    Views:
    644
    Kiran
    Oct 26, 2006
  5. Sharkie Landshark

    Best compiled language for extending Ruby

    Sharkie Landshark, Dec 18, 2007, in forum: Ruby
    Replies:
    24
    Views:
    308
    Chad Perrin
    Dec 20, 2007
Loading...

Share This Page