This is the code for the examples on http://qoppac.blogspot.co.uk/2014/03/using-swigibpy-so-that-python-will-play.html
It shows how we can use swigibpy (https://github.com/Komnomnomnom/swigibpy) to access the C++ API for interactive brokers using python for a series of simple examples