20.3. Related Topics

SWIG

There is an external tool available called SWIG, which stands for Simplified Wrapper and Interface Generator. It was written by David Beazley, also the author of Python Essential Reference, and is a software tool that can take annotated C/C++ header files and generate wrapped code, ready to compile for Python, Tcl, and Perl. In fact, it is so simple that once you get comfortable using it, you can practically bypass everything we have discussed in this chapter! You can find out more information about SWIG from its main Web site located at the following Web address (URL):


Embedding

Embedding is another feature which is available in Python. It is the inverse of an extension. Rather than taking C code and wrapping it into Python, you take a C application and wrap a Python interpreter inside it. This has the effect of giving a potentially large, monolithic, and perhaps rigid, proprietary, and/or mission-critical application the power of having an embedded Python interpreter. Once you have Python, well, it's like a whole new ball game.

To conclude, we would like to mention that there are two pieces of official Python documentation related to the material in this chapter, “Embedding and Extending the Python Interpreter” and “Python/C API Reference Manual.” Both will be able to fill in the gaps that we left and are available at the Python home page or directly at this link:


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset