In this final part of the series I’m going to look at one further way we can use Boost.Python to help when using a C++ class within Python. In the previous part we built a wrapper for a C++ class, exposing a number of class methods to Python. However, in Python, it’s quite typical for […]
Advanced C++ / Python integration with Boost.Python (Part 2)
Last time we looked at how to use Boost.Python to wrap a very simple piece of C++ code. This time we’re going to take that one step further along, and do the same thing for a more complex C++ example – which includes a C++ Class. For the purposes of this example – let us […]
Advanced C++ / Python integration with Boost.Python
In a previous post, I described how you could use the ctypes Python library to import a C++ class to make it usable from within Python. There is however, another way to do this; and that’s by using Boost.Python (which as the name suggests is a part of the Boost C++ library suite). Whilst this […]
Calling C++ Classes from Python, with ctypes…
I recently found myself needing to call a C++ class from within Python. I didn’t want to call a separate process (as I had previously when using Thrift – see Using Apache Thrift for Python & C++); but rather to call a C++ library directly. Before I go on I should say that there are a […]
Apache Thrift Tutorial — Part 2
Last time we looked at how to write a server application in C++, and call it from Python. This time, we’ll do things the other way around: implementing a service in Python, and calling from C++.
Using Apache Thrift for Python & C++
Apache Thrift is a software framework for cross-language: providing what is essentially a remote-procedure call interface to enable a client application to access services from a service — which can be written in the-same, or another language. Thrift supports all of the major languages that you’d expect to use: including Python, C++, Java, JavaScript / […]