PeerJ, PeerJ Computer Science, (4), p. e149
DOI: 10.7717/peerj-cs.149
Full text: Download
The Python programming language is one of the most popular language in scientific computing. However, most scientific Python packages incorporates C and C++ libraries. While several semi-automatic solutions and tools exist to wrap C++ libraries (Cython, Boost.Python and SWIG), the process of wrapping a large C++ library is cumbersome and time consuming. Some solutions have been developed in the past (e.g. Py++) but require to write complex code to automate the process, and rely on technologies that are not maintained. AutoWIG relies on the LLVM/Clang technology for parsing C/C++ code and the Mako templating engine for generating Boost.Python wrappers. Rather than having to write parsers in Python such as in Py++, the approach is similar to XDress, but for Boost.Python wrappers instead of Cython wrappers. We illustrate the usage of AutoWIG on a complex collection of C++ libraries for statistical analysis.