import sys if sys.version_info.major > 2: from PyQt5 import QtGui, QtCore else: from PyQt4 import QtGui, QtCore