num sub( num display(num saves the +'thispointer res num square(print('square'resconverted +int return value num data val num data print('data'valprint('data+ 'val set +data membergenerated __setattr__ get +data membergenerated __getattr__ returns normal python integer object num display(print(numdel num runs repr in shadow/proxy class runs +destructor automatically because the +class and its wrappers are automatically loaded when imported by the number py shadow class moduleyou run this script like any other/pp /integrate/extend/swig/shadowpython main py number add number= sub number= square data data+ number= ~number much of this output is coming from the +class' methods and is largely the same as the main cxx results shown in example - (less the instance output format--it' python shadow class instance nowusing the low-level extension module swig implements integrations as ++/python combinationbut you can always use the generated accessor functions module if you want toas in example - this version runs the +extension module directly without the shadow classto demonstrate how the shadow class maps calls back to +example - pp \integrate\extend\swig\shadow\main_low py ""run similar tests to main cxx and main py but use low-level accessor function interface ""from _number import +extension module wrapper num new_number( number_add(num pass +'thispointer explicitly python/ integration