##// END OF EJS Templates
Merge branch 'fix185' of https://github.com/ivanov/ipython into ivanov-fix185
Fernando Perez -
r3358:655d021a merge
parent child Browse files
Show More
@@ -1149,19 +1149,6 b' class IPShellMatplotlibQt4(IPShellQt4):'
1149 #-----------------------------------------------------------------------------
1149 #-----------------------------------------------------------------------------
1150 # Factory functions to actually start the proper thread-aware shell
1150 # Factory functions to actually start the proper thread-aware shell
1151
1151
1152 def check_gtk(mode):
1153 try:
1154 import gtk
1155 except (ImportError, RuntimeError):
1156 # GTK not present, or can't be started (no X11, happens in console)
1157 return mode
1158 if hasattr(gtk,'set_interactive'):
1159 gtk.set_interactive(False)
1160 return 'tkthread'
1161 else:
1162 return mode
1163
1164
1165 def _select_shell(argv):
1152 def _select_shell(argv):
1166 """Select a shell from the given argv vector.
1153 """Select a shell from the given argv vector.
1167
1154
@@ -1231,10 +1218,6 b' def _select_shell(argv):'
1231 else:
1218 else:
1232 # Any other backend, use plain Tk
1219 # Any other backend, use plain Tk
1233 th_mode = 'tkthread'
1220 th_mode = 'tkthread'
1234
1235 # New versions of pygtk don't need the brittle threaded support.
1236 th_mode = check_gtk(th_mode)
1237
1238 return mpl_shell[th_mode]
1221 return mpl_shell[th_mode]
1239 else:
1222 else:
1240 # No pylab requested, just plain threads
1223 # No pylab requested, just plain threads
@@ -1242,10 +1225,6 b' def _select_shell(argv):'
1242 th_mode = special_opts.pop()
1225 th_mode = special_opts.pop()
1243 except KeyError:
1226 except KeyError:
1244 th_mode = 'tkthread'
1227 th_mode = 'tkthread'
1245
1246 # New versions of pygtk don't need the brittle threaded support.
1247 if th_mode == 'gthread':
1248 th_mode = check_gtk(th_mode)
1249 return th_shell[th_mode]
1228 return th_shell[th_mode]
1250
1229
1251
1230
General Comments 0
You need to be logged in to leave comments. Login now