##// END OF EJS Templates
Minor doc update.
Minor doc update.

File last commit:

r2216:5113ef3a
r2218:441d6041
Show More
gui-gtk.py
35 lines | 582 B | text/x-python | PythonLexer
#!/usr/bin/env python
"""Simple GTK example to manually test event loop integration.
This is meant to run tests manually in ipython as:
In [5]: %gui gtk
In [6]: %run gui-gtk.py
"""
import pygtk
pygtk.require('2.0')
import gtk
def hello_world(wigdet, data=None):
print "Hello World"
window = gtk.Window(gtk.WINDOW_TOPLEVEL)
button = gtk.Button("Hello World")
button.connect("clicked", hello_world, None)
window.add(self.button)
button.show()
window.show()
try:
from IPython.lib.inputhook import appstart_gtk
appstart_gtk()
except ImportError:
gtk.main()