Python and C

H

hermes

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
 
S

Simon Burton

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

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

Simon.
 

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
474,183
Messages
2,570,968
Members
47,518
Latest member
TobiasAxf

Latest Threads

Top