added the python script

@karlnapf 
take a look at this.
I dont like this, could you make this explicit and put a comment whats going on there?
pythonic way is try-catch