article header image

It was my birthday earlier this week (Monday the 27:th to be exact) and since my daughter Sofia had her first birthday the 21:th we had a joint celebration over the weekend. Mainly the gifts were targeted at my daughter since I am a bit to old really to get birthday gifts.

But I did get some things and among them one thing really stood out it was a poem written by what is loosely I guess a cousin to our children.

article header image

This is a tutorial for how to embed python correctly inside a multi threaded program. Python is a very neat language which is very easy to embed inside C++ thanks to the boost::python library. But there are some crucial parts which is missing from boost:python in regards to how to manage GIL and thread state which I introduce here. Since this is my first C++ tutorial I will include boost:thread as well as a quick hello world application as well.

article header image

One of the new features of the up-coming NSClient++ 0.4.0 will be Python scripting support. The main reason for me to include Python script (apart from the coolness factor) is to write unit tests. Writing unit test for a monitoring agent with a C++ unit test kit is pretty difficult but more importantly not very productive. The main feature of an agent is to interact with the system and thus you need to know about the system to be able to test it (or mock the system which is tedious at best).