$(swig- +-python number number pynumber $(swig- +-python number wrapped +class code number onumber cxx number +number cxx - - -wno-deprecated non python test cxxtestg+main cxx number cxx -wno-deprecated cleanforcerm - pyc dll core exe rm - pyc dll core exe number_wrap cxx number py as usualrun this makefile to generate and compile the necessary glue code into an extension module that can be imported by python programs/pp /integrate/extend/swig/shadowmake - makefile number-swig /cygdrive/ /temp/swigwin-/swig - +-python number +number_wrap cxx - - - /usr/local/include/python +number cxx - - -wno-deprecated +-shared number_wrap number - /usr/local/bin -lpython - _number dll /pp /integrate/extend/swig/shadowls _number dll makefile number-swig number exe number cxx number main cxx number number py number_wrap cxx number_wrap using the +class in python once the glue code is generated and compiledpython scripts can access the +class as though it were coded in python in factit is--the imported number py shadow class which runs on top of the extension module is generated python code example - repeats the main cxx file' class tests herethoughthe +class is being utilized from the python programming language--an arguably amazing featbut the code is remarkably natural on the python side of the fence example - pp \integrate\extend\swig\shadow\main py ""use +class in python code ( +module py shadow classthis script runs the same tests as the main cxx +file ""from number import number imports py +shadow class module num number( num add( make +class object in python call its methods from python wrapping +classes with swig