First page Back Continue Last page Overview Graphics

Building the Python Interface

The example.i file:

extern double My_variable;

extern int fact(int n);

extern int my_mod(int x, int y);

extern char *get_time();

Building the Python Interface with SWIG:

swig -python example.i

or in case of C++:

swig -c++ -python example.i

This creates the following files:

example_wrap.c

example.py