Title of article :
Using SWIG to bind C++ to Python
Author/Authors :
T.L.، Cottom, نويسنده ,
Issue Information :
روزنامه با شماره پیاپی سال 2003
Pages :
-87
From page :
88
To page :
0
Abstract :
An increasingly popular approach to scientific computing is to combine Python and compiled modules. Such an approach merges the high performance typically found in compiled routines with the interface of a flexible, scalable, and easy-to-learn interpreted language. Although using C to hand-code extensions to Python binds the latter to a given compiled asset in C++, programmers who used C++ʹs more advanced features (until recently) lacked the automated support available in Fortran and C. One tool for creating Python bindings to C the Simplified Wrapper and Interface Generator. SWIG-an open-source application used by a large and ever-expanding community-began as an effort to expose physics packages in a large parallel simulation code to interpreted languages. SWIG preprocesses C and C++ code and generates library bindings in several interpreted languages including Python, Pert, Tcl, and Java. Recent improvements to SWIG provide greater support for binding C++ code. SWIG now creates, for example, bindings for some of C++ʹs more advanced features such as templates and exceptions. This article explores how SWIG does this by examining a series of small C++ code examples.
Journal title :
Computing in Science and Engineering
Serial Year :
2003
Journal title :
Computing in Science and Engineering
Record number :
86509
Link To Document :
بازگشت