做个备份,免得将来忘了
swig –python example.i
python setup.py build_ext --compiler=mingw32 –inplace
#setup.py
from distutils.core import setup, Extension
module1 = Extension('_example', sources=['example_wrap.c','example.c'])
setup ( name = 'example',
version = '1.0',
description = 'Simple example from SWIG tutorial',
ext_modules = [module1])