Show More
@@ -1,13 +1,7 b'' | |||||
1 | import sys |
|
1 | import sys | |
2 |
|
2 | |||
3 | from twisted.internet import gtk2reactor |
|
|||
4 | gtk2reactor.install() |
|
|||
5 |
|
||||
6 | from twisted.internet import reactor, threads |
|
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 | from IPython.ipmaker import make_IPython |
|
5 | from IPython.ipmaker import make_IPython | |
12 | from IPython.iplib import InteractiveShell |
|
6 | from IPython.iplib import InteractiveShell | |
13 | from IPython.ipstruct import Struct |
|
7 | from IPython.ipstruct import Struct | |
@@ -16,6 +10,11 b' from signal import signal, SIGINT' | |||||
16 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no |
|
10 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no | |
17 | import shellglobals |
|
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 | def hijack_reactor(): |
|
19 | def hijack_reactor(): | |
21 | """Modifies Twisted's reactor with a dummy so user code does |
|
20 | """Modifies Twisted's reactor with a dummy so user code does | |
@@ -125,8 +124,7 b' class TwistedInteractiveShell(InteractiveShell):' | |||||
125 | print "Warning: Timeout for mainloop thread exceeded" |
|
124 | print "Warning: Timeout for mainloop thread exceeded" | |
126 | print "switching to nonthreaded mode (until mainloop wakes up again)" |
|
125 | print "switching to nonthreaded mode (until mainloop wakes up again)" | |
127 | self.worker_ident = None |
|
126 | self.worker_ident = None | |
128 | else: |
|
127 | else: | |
129 | shellglobals.CURRENT_COMPLETE_EV = completed_ev |
|
|||
130 | completed_ev.wait() |
|
128 | completed_ev.wait() | |
131 |
|
129 | |||
132 | return False |
|
130 | return False |
General Comments 0
You need to be logged in to leave comments.
Login now