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. Advertisements

  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. Advertisements

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,485
    Dimitri Maziuk
    Mar 27, 2006
  2. DaveInSidney
    Replies:
    0
    Views:
    667
    DaveInSidney
    May 9, 2005
  3. Johannes Zellner
    Replies:
    1
    Views:
    436
    Fredrik Lundh
    Jan 18, 2006
  4. Kiran
    Replies:
    5
    Views:
    430
    Kiran
    Oct 26, 2006
  5. pabbu
    Replies:
    8
    Views:
    995
    Marc Boyer
    Nov 7, 2005
  6. Kiran
    Replies:
    3
    Views:
    842
    Kiran
    Oct 26, 2006
  7. Shravani
    Replies:
    8
    Views:
    988
    Bartc
    Mar 16, 2008
  8. Sharkie Landshark

    Best compiled language for extending Ruby

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