Updating python code

I could not find a way to delete this thread shortly after I created it.