generate two different python modules againnumber_wrap cxx +extension module with class accessor functions number py python shadow class module that wraps accessor functions the former must be compiled into binary library the latter imports and uses the former' compiled form and is the file that python scripts ultimately import as for simple functionsswig achieves the integration with combination of python and +code after running swigthe cygwin makefile shown in example - combines the generated number_wrap cxx +wrapper code module with the +class implementation file to create _number dll-- dynamically loaded extension module that must be in directory on your python module search path when imported from python scriptalong with the generated number py (all files are in the same current working directory hereas beforethe compiled extension module must be named with leading underscore in swig today_number dllfollowing python conventionrather than the other formats used by earlier releases the shadow class module number py internally imports _number dll be sure to use - +command-line argument for swigan older -shadow argument is no longer needed to create the wrapper class in addition to the lower-level functional interface moduleas this is enabled by default example - pp \integrate\extend\swig\shadow\makefile number-swig ##########################################################################use swig to integrate the number +class for use in python programs updatename "_number dllmattersbecause shadow class imports _number updatethe "-shadowswig command line arg is deprecated (on by defaultupdateswig no longer creates doc file to rm here (ancient history##########################################################################pylib /usr/local/bin pyinc /usr/local/include/python swig /cygdrive/ /temp/swigwin-/swig all_number dll number py wrapper real class _number dllnumber_wrap number +-shared number_wrap number - $(pylib-lpython - $generated class wrapper module(snumber_wrap onumber_wrap cxx number +number_wrap cxx - - - $(pyinc python/ integration