##// END OF EJS Templates
inputhook: use '%gui none' for disabling the input hook.
Christian Boos -
Show More
@@ -32,6 +32,7 b" GUI_TK = 'tk'"
32 32 GUI_OSX = 'osx'
33 33 GUI_GLUT = 'glut'
34 34 GUI_PYGLET = 'pyglet'
35 GUI_NONE = 'none' # i.e. disable
35 36
36 37 #-----------------------------------------------------------------------------
37 38 # Utilities
@@ -417,8 +418,8 b' def enable_gui(gui=None, app=None):'
417 418 Parameters
418 419 ----------
419 420 gui : optional, string or None
420 If None, clears input hook, otherwise it must be one of the recognized
421 GUI names (see ``GUI_*`` constants in module).
421 If None (or 'none'), clears input hook, otherwise it must be one
422 of the recognized GUI names (see ``GUI_*`` constants in module).
422 423
423 424 app : optional, existing application object.
424 425 For toolkits that have the concept of a global app, you can supply an
@@ -433,6 +434,7 b' def enable_gui(gui=None, app=None):'
433 434 one.
434 435 """
435 436 guis = {None: clear_inputhook,
437 GUI_NONE: clear_inputhook,
436 438 GUI_OSX: lambda app=False: None,
437 439 GUI_TK: enable_tk,
438 440 GUI_GTK: enable_gtk,
@@ -90,8 +90,11 b' def create_inputhook_qt4(mgr, app=None):'
90 90 except KeyboardInterrupt:
91 91 got_kbdint[0] = True
92 92 mgr.clear_inputhook()
93 print("\n(event loop interrupted - "
94 "hit CTRL+C again to clear the prompt)")
93 print("\nKeyboardInterrupt - qt4 event loop interrupted!"
94 "\n * hit CTRL+C again to clear the prompt"
95 "\n * use '%gui none' to disable the event loop"
96 " permanently"
97 "\n and '%gui qt4' to re-enable it later")
95 98 return 0
96 99
97 100 def preprompthook_qt4(ishell):
General Comments 0
You need to be logged in to leave comments. Login now