from PyQt4 import QtCore, QtGui import math import sys a=1 b=2 c=3 d=4 e=5 f=6 g=7 def funcA(a, b): return 1 def SetupScene(scene): return 1 if __name__ == "__main__": app = QtGui.QApplication(sys.argv) scene = QtGui.QGraphicsScene() win = QtGui.QGraphicsView(scene) win.show() sys.exit(app.exec_())