Tried to make gridtk python 3 compatible.