##// END OF EJS Templates
Fixing minor bugs in IPython.kernel....
Fixing minor bugs in IPython.kernel. * Regular expressions now using raw strings in launcher.py * Directory permissions on cluster directory handled properly. * A raw ipcluster start will now create cluster default and add the default config files. * Config files updated to use raw strings where appropriate.

File last commit:

r2214:9fca2a63
r2342:9e3db2d3
Show More
gui-qt.py
40 lines | 982 B | text/x-python | PythonLexer
Fernando Perez
Added a Qt4 simple example to test %gui functionality....
r2211 #!/usr/bin/env python
"""Simple Qt4 example to manually test event loop integration.
This is meant to run tests manually in ipython as:
In [5]: %gui qt
In [6]: %run gui-qt.py
Ref: Modified from http://zetcode.com/tutorials/pyqt4/firstprograms/
"""
import sys
from PyQt4 import QtGui, QtCore
class SimpleWindow(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setGeometry(300, 300, 200, 80)
self.setWindowTitle('Hello World')
quit = QtGui.QPushButton('Close', self)
quit.setGeometry(10, 10, 60, 35)
self.connect(quit, QtCore.SIGNAL('clicked()'),
self, QtCore.SLOT('close()'))
if __name__ == '__main__':
app = QtCore.QCoreApplication.instance()
if app is None:
app = QtGui.QApplication([])
sw = SimpleWindow()
sw.show()
Fernando Perez
In-progress work on trying to get a robust inputhook setup....
r2213 try:
Brian Granger
Finishing up the wx, qt4 and tk support. Still have to do gtk.
r2214 from IPython import appstart_qt4; appstart_qt4(app)
Fernando Perez
In-progress work on trying to get a robust inputhook setup....
r2213 except ImportError:
app.exec_()