num->display()cout <num <endldelete num/print raw instance ptr /run destructor you can use the +command-line +compiler program to compile and run this code on cygwin (it' the same on linuxif you don' use similar systemyou'll have to extrapolatethere are far too many +compiler differences to list here type the compile command directly or use the cxxtest target in this example directory' makefile shown aheadand then run the purely +program created/pp /integrate/extend/swig/shadowmake - makefile number-swig cxxtest +main cxx number cxx -wno-deprecated /pp /integrate/extend/swig/shadow/ exe number add number= sub number= square data data+ number= xe ~number wrapping the +class with swig but enough ++let' get back to python to use the +number class of the preceding section in python scriptsyou need to code or generate glue logic layer between the two languagesjust as in prior extension examples to generate that layer automaticallywrite swig input file like the one shown in example - example - pp \integrate\extend\swig\shadow\number /*******************************************************swig module description file for wrapping +class generate by running "swig - +-python number ithe +module is generated in file number_wrap cxxmodule 'numberrefers to the number py shadow class ********************************************************%module number %#include "number %%include number wrapping +classes with swig