Python and C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • hermes@numericable.fr

    Python and C

    Hi, this may be a newbie question, as I'm quite new to python but I'd rather get
    your points of view instead of wasting a week or two on a wrong way

    I'm using python 2.3 on a mandrake brand new system

    My problem : I'd like to use a complex C program under python.
    After few researchs I tested SWIG, which seems to work for me exept that I'd
    like to be able to
    use a C function under python that has this prototype

    void Fitimp(double *x1, double *x2... )

    these double parameters are lists of double precision number.
    The python script will read this datas from files, So i'd like to know how to
    transform a python list of double precision float to a C double * variable

    Thx for your help

    Gilles A


  • Simon Burton

    #2
    Re: Python and C

    On Fri, 20 Feb 2004 12:03:31 +0100, herme wrote:
    [color=blue]
    > Hi, this may be a newbie question, as I'm quite new to python but I'd
    > rather get your points of view instead of wasting a week or two on a wrong
    > way
    >
    > I'm using python 2.3 on a mandrake brand new system
    >
    > My problem : I'd like to use a complex C program under python. After few
    > researchs I tested SWIG, which seems to work for me exept that I'd like to
    > be able to[/color]
    ....

    Have you looked at Pyrex ? It's quite easy to get up and running.

    Simon.

    Comment

    Working...