So here's my first python code I've ever written (and hopefully the last). It currently hangs up in the line where the event is added to rtcom-eventlogger but I think this is because I don't understand ctypes. But maybe it helps someone. The whole code in c is easy, but Python is horrible to me ...