python script from blog post: http://blog.swisstech.net/2013/01/simple-generic-python-script-to-access.html