SWIG Master ClassCopyright (C) 2008David M. Beazley http://www.dabeaz.com Presented at PyCon'08, March 13, 2008, Chicago, Illinois. IntroductionThis tutorial takes an in-depth look at SWIG, a tool for building C/C++ extensions to Python.
SoftwareThis tutorial assumes the use of SWIG-1.3.33. Various versions are available for download at You will need to have Swig installed in a standard location on your machine to proceed with the demonstrations. Note: Swig is often preinstalled on many Linux distributions. It is also pre-installed on OS-X Leopard. Be aware that these installations often use older versions of Swig that may be out of date with certain details of the presentation slides.SamplesThe following download includes a number of samples we will be using to illustrate concepts. The samples include both some simple C code, simple C++ code, along with distutils setup.py files needed to get the samples to compile. The samples should work on all Unix-based systems (Linux, BSD, OS-X). The samples may work on Windows provided that you have configured your machine to properly build extension modules (which is nontrivial).The following code samples are provided:
|