Chapter 5. Advanced Cython
Throughout this book, we have exclusively been mixing C and Python together. In this chapter, we will delve into C++ and Cython. With every release of Cython C++, the support has improved. This is not to say that it's not ready for use yet. In this chapter, we will cover the following topics:
- Make native C++ classes callable from Python.
- Wrapping C++ namespaces and templates
- How exceptions can be propagated to and from C++ and Python
- C++ new and del keyword
- Operator overloading
- Cython gil and nogil keywords
We will wrap up this chapter by embedding a web server into a toy C++ messaging server.