Migration to Python3 so it works with gedit 3.10