/******************************************************************** simple library filewith single function"message"which is to be made available for use in python programs there is nothing about python here--this function can be called from programas well as python (with glue code*********************************************************************#include #include static char result[ ]/this isn' exported *char message(char *labelstrcpy(result"hello")strcat(resultlabel)return result/this is exported */build up string */add passed-in label */return temporary *while you're at itdefine the usual header file to declare the function externallyas shown in example - this is probably overkill for such small examplebut it will prove point example - pp \integrate\extend\hellolib\hellolib /*******************************************************************define hellolib exports to the namespacenot to python programs--the latter is defined by method registration table in python extension module' codenot by this ********************************************************************extern char *message(char *label)nowinstead of all the python extension glue code shown in the prior sectionssimply write swig type declarations input fileas in example - example - pp \integrate\extend\swig\hellolib /*****************************************************swig module description filefor lib file generate by saying "swig -python hellolib ******************************************************%module hellowrap %#include %extern char *message(char*)/or%include /hellolib/hellolib */or%include hellolib hand use - arg * python/ integration