Ported code to Python 2 with PySide (was Python 3 and PyQt5 before)