Python3

Some adaptations for helping with the port to Python3. I'm not sure about the tkinter stuff and Python2…