From 655d021a54b20f06b22cc3edb861c9ed3a1f9187 2011-02-23 21:58:57 From: Fernando Perez Date: 2011-02-23 21:58:57 Subject: [PATCH] Merge branch 'fix185' of https://github.com/ivanov/ipython into ivanov-fix185 --- diff --git a/IPython/Shell.py b/IPython/Shell.py index 38006d7..f07337d 100644 --- a/IPython/Shell.py +++ b/IPython/Shell.py @@ -1149,19 +1149,6 @@ class IPShellMatplotlibQt4(IPShellQt4): #----------------------------------------------------------------------------- # Factory functions to actually start the proper thread-aware shell -def check_gtk(mode): - try: - import gtk - except (ImportError, RuntimeError): - # GTK not present, or can't be started (no X11, happens in console) - return mode - if hasattr(gtk,'set_interactive'): - gtk.set_interactive(False) - return 'tkthread' - else: - return mode - - def _select_shell(argv): """Select a shell from the given argv vector. @@ -1231,10 +1218,6 @@ def _select_shell(argv): else: # Any other backend, use plain Tk th_mode = 'tkthread' - - # New versions of pygtk don't need the brittle threaded support. - th_mode = check_gtk(th_mode) - return mpl_shell[th_mode] else: # No pylab requested, just plain threads @@ -1242,10 +1225,6 @@ def _select_shell(argv): th_mode = special_opts.pop() except KeyError: th_mode = 'tkthread' - - # New versions of pygtk don't need the brittle threaded support. - if th_mode == 'gthread': - th_mode = check_gtk(th_mode) return th_shell[th_mode]