I'm learning PyQt4 right now and made a little script which should open a "Hello World!" box. It works the first time I run it, but the second time, the script does nothing and crashes the ipython-notebook kernal, which requires a restart. I'm using the Spyder IDE in Anaconda, under Windows. This is the code:
import sys
from PyQt4 import Qt,QtGui
a = Qt.QApplication(sys.argv)
a.setActiveWindow(QtGui.QMainWindow())
hello = Qt.QLabel("Hello, World")
hello.show()
a.exec_()