##// END OF EJS Templates
Do not require GTK to be either present or usable to start....
Fernando Perez -
Show More
@@ -1152,7 +1152,8 b' class IPShellMatplotlibQt4(IPShellQt4):'
1152 def check_gtk(mode):
1152 def check_gtk(mode):
1153 try:
1153 try:
1154 import gtk
1154 import gtk
1155 except ImportError:
1155 except (ImportError, RuntimeError):
1156 # GTK not present, or can't be started (no X11, happens in console)
1156 return mode
1157 return mode
1157 if hasattr(gtk,'set_interactive'):
1158 if hasattr(gtk,'set_interactive'):
1158 gtk.set_interactive(False)
1159 gtk.set_interactive(False)
@@ -1243,6 +1244,7 b' def _select_shell(argv):'
1243 th_mode = 'tkthread'
1244 th_mode = 'tkthread'
1244
1245
1245 # New versions of pygtk don't need the brittle threaded support.
1246 # New versions of pygtk don't need the brittle threaded support.
1247 if th_mode == 'gthread':
1246 th_mode = check_gtk(th_mode)
1248 th_mode = check_gtk(th_mode)
1247 return th_shell[th_mode]
1249 return th_shell[th_mode]
1248
1250
General Comments 0
You need to be logged in to leave comments. Login now