#!/usr/bin/env python """Equivalent to ipython -gthread but with different mainloop semantics. For testing some GTK-related problems reported on list by G. Carneiro. """ import IPython.Shell def hijack_gtk(): """No-op version of the original mainloop hijacker """ import gtk return gtk.main IPython.Shell.hijack_gtk = hijack_gtk ip = IPython.Shell.IPShellGTK() ip.mainloop()