##// END OF EJS Templates
Forgot to add a file.
Thomi Richards -
Show More
@@ -0,0 +1,34 b''
1 # encoding: utf-8
2 """
3 Enable Gtk3 to be used interacive by IPython.
4
5 Authors: Thomi Richards
6 """
7 #-----------------------------------------------------------------------------
8 # Copyright (c) 2012, the IPython Development Team.
9 #
10 # Distributed under the terms of the Modified BSD License.
11 #
12 # The full license is in the file COPYING.txt, distributed with this software.
13 #-----------------------------------------------------------------------------
14
15 #-----------------------------------------------------------------------------
16 # Imports
17 #-----------------------------------------------------------------------------
18
19 import sys
20 from gi.repository import Gtk, GLib
21
22 #-----------------------------------------------------------------------------
23 # Code
24 #-----------------------------------------------------------------------------
25
26 def _main_quit(*args, **kwargs):
27 Gtk.main_quit()
28 return False
29
30
31 def inputhook_gtk3():
32 GLib.io_add_watch(sys.stdin, GLib.IO_IN, _main_quit)
33 Gtk.main()
34 return 0
General Comments 0
You need to be logged in to leave comments. Login now