source: trunk/server/common/patches/ipython-do-not-require-gtk.patch @ 1736

Last change on this file since 1736 was 1726, checked in by ezyang, 13 years ago
Scriptsify ipython, add patch for GTK.
File size: 786 bytes
  • IPython/Shell.py

    diff --git a/IPython/Shell.py b/IPython/Shell.py
    index 9481099..38006d7 100644
    a b class IPShellMatplotlibQt4(IPShellQt4): 
    11521152def check_gtk(mode):
    11531153    try:
    11541154        import gtk
    1155     except ImportError:
     1155    except (ImportError, RuntimeError):
     1156        # GTK not present, or can't be started (no X11, happens in console)
    11561157        return mode
    11571158    if hasattr(gtk,'set_interactive'):
    11581159        gtk.set_interactive(False)
    def _select_shell(argv): 
    12431244            th_mode = 'tkthread'
    12441245
    12451246        # New versions of pygtk don't need the brittle threaded support.
    1246         th_mode = check_gtk(th_mode)
     1247        if th_mode == 'gthread':
     1248            th_mode = check_gtk(th_mode)
    12471249        return th_shell[th_mode]
    12481250
Note: See TracBrowser for help on using the repository browser.