##// END OF EJS Templates
twshell: do not install gtk2 reactor automatically
Ville M. Vainio -
Show More
@@ -1,13 +1,7 b''
1 1 import sys
2 2
3 from twisted.internet import gtk2reactor
4 gtk2reactor.install()
5
6 3 from twisted.internet import reactor, threads
7 4
8 """ change here to choose the plot shell with the MT option
9 which should cost extra """
10
11 5 from IPython.ipmaker import make_IPython
12 6 from IPython.iplib import InteractiveShell
13 7 from IPython.ipstruct import Struct
@@ -16,6 +10,11 b' from signal import signal, SIGINT'
16 10 from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no
17 11 import shellglobals
18 12
13 def install_gtk2():
14 """ Install gtk2 reactor, needs to be called bef """
15 from twisted.internet import gtk2reactor
16 gtk2reactor.install()
17
19 18
20 19 def hijack_reactor():
21 20 """Modifies Twisted's reactor with a dummy so user code does
@@ -125,8 +124,7 b' class TwistedInteractiveShell(InteractiveShell):'
125 124 print "Warning: Timeout for mainloop thread exceeded"
126 125 print "switching to nonthreaded mode (until mainloop wakes up again)"
127 126 self.worker_ident = None
128 else:
129 shellglobals.CURRENT_COMPLETE_EV = completed_ev
127 else:
130 128 completed_ev.wait()
131 129
132 130 return False
General Comments 0
You need to be logged in to leave comments. Login now