An increasingly popular approach to scientificomputing is to combine Pythonand compiled modules. Such an approach merges the high performance typically found in compiledroutines with the interface of a flexible, scala...
详细信息
An increasingly popular approach to scientificomputing is to combine Pythonand compiled modules. Such an approach merges the high performance typically found in compiledroutines with the interface of a flexible, scalable, and easy-to-learn interpreted *** using to hand-code extensions to Python binds the latter to a given compiled asset inC++, programmers who used C++'s more advanced features (until recentlylacked the automated supportavailable in Fortran and C. One tool for creating Python bindings to the simplifiedwrapper andinterfacegenerator. SWIG-an open-source application used by a large and ever-expandingcommunity-began as an effort to expose physics packages in a large parallel simulation code tointerpreted languages. SWIG preprocesses and C++ code and generates library bindings in severalinterpreted languages including Python, Pert, Tcl, and Java. Recent improvements to SWIG providegreater support for binding C++ code. SWIG now creates, for example, bindings for some of C++'s moreadvanced features such as templates and exceptions. This article explores how SWIG does this byexamining a series of small C++ code examples.
暂无评论