C pointer representation in python

abarun22 at gmail.com abarun22 at gmail.com
Mon Nov 26 11:54:24 CET 2007

I am new to SWIG and python. I have a problem while trying to call a C
function from Python using SWIG as an interface. The function is
defined as follows.

void* myfunc(TfichierDLR *fichier, char *nom, char *type, char *txt,
char *classe, TicThemeDLR *icTheme, int **num, int *ier)

The last two are output parameters (**num and *ier) and i wonder how
to represent those while calling from python. Especially 'num' being a
double pointer is tricky to handle. Also how can we represent the
return variable which is a null pointer.

I would be extremely pleased to hear any ideas/suggestions in this


More information about the Python-list mailing list