Using Argparse in Python – a quick reference guide

This post is inspired by an example in this video by John Hammond (no, not the Weatherman – the information security researcher and communicator). The main content of that video is actually irrelevant to this post; but during the video John makes use of the Python library Argparse to add command-line arguments to the tool […]

Advanced C++ / Python integration with Boost.Python (Part 3)

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 / […]

RegEx Golf

Inspired by the famous XKCD cartoon that started it and by Google’s Peter Norvig over on O’Reilly.com I decided to play some RegEx Golf myself this Easter… If you’re not familiar with the game – the idea is to write the shortest regular expression possible that will select every element of a list, without selecting […]

Google Chromebook

Google & Samsung have announced the details of the first generation of Chromebooks – thin-client laptops running Google’s Chrome OS & reliant on a web connection for all of their capabilities. But can they succeed in a competitive market-place? The Chromebook is a nice idea. Thin-client (cloud) computing is becoming (if not yet the norm) […]

Ed Roberts (1941-2010)

I was saddened today to hear (albeit rather belatedly) about the death of the some-time pioneering micro-computer engineer Ed Robterts.  Roberts died on 1st April 2010: aged just 68. Roberts’ creation, the Altair 8800 was, arguably, the most important personal micro-computer ever made.  It was the machine that made the dream of a personal computer […]