Bewildered graphs

Roman Suzi rnd at
Sun Jul 6 09:01:32 CEST 2003

Here is ploticus.i file I made 30 minutes ago:


/* ploticus.i */
 %module ploticus
 /* Put header files here (optional) */

%name(init) extern ploticus_init( char *device, char *outfilename );
%name(arg) extern ploticus_arg( char *name, char *value );
%name(begin) extern ploticus_begin();
%name(execline) extern ploticus_execline( char *line );
%name(execscript) extern ploticus_execscript( char *scriptfile, int prefab );
%name(end) extern ploticus_end();
%name(setvar) extern ploticus_setvar( char *name, char *value );
%name(getvar) extern ploticus_getvar( char *name, char *value );

If you have SWIG, just do this:

0. install SWIG

1. get Ploticus source (plsrc211.tgz in my case) untarred

2. cd plsrc211/src

3. make -f Makefile_api

4. put my ploticus.i into current dir (plsrc211/src)

5. run:   
   swig -python ploticus.i
   gcc -c ploticus_wrap.c -I /usr/local/include/python2.3
   ld -shared ploticus_wrap.o -l gd libploticus.a -o

(/usr/local/include/python2.3 - in my case, your Python could be
somewhere else)

6. check:


>>> import ploticus
>>> dir(ploticus)
['__doc__', '__file__', '__name__', 'arg', 'begin', 'end', 'execline', 
'execscript', 'getvar', 'init', 'setvar']
>>> # do whatever with it

I never used neither SWIG nor Ploticus before. So it is hard to tell
if ploticus Python wrapper works ;-)

Sincerely yours, Roman Suzi
rnd at =\= My AI powered by GNU/Linux RedHat 7.3

More information about the Python-list mailing list