bundles / IPython 9.11.0 / IPython / core / magics / basic / BasicMagics / gui
function
IPython.core.magics.basic:BasicMagics.gui
Signature
def gui ( self , parameter_s = '' ) Summary
Enable or disable IPython GUI event loop integration.
Extended Summary
%gui [GUINAME]
This magic replaces IPython's threaded shells that were activated using the (pylab/wthread/etc.) command line flags. GUI toolkits can now be enabled at runtime and keyboard interrupts should work without any problems. The following toolkits are supported: wxPython, PyQt4, PyGTK, Tk and Cocoa (OSX)
%gui wx # enable wxPython event loop integration %gui qt # enable PyQt/PySide event loop integration # with the latest version available. %gui qt6 # enable PyQt6/PySide6 event loop integration %gui qt5 # enable PyQt5/PySide2 event loop integration %gui gtk # enable PyGTK event loop integration %gui gtk3 # enable Gtk3 event loop integration %gui gtk4 # enable Gtk4 event loop integration %gui tk # enable Tk event loop integration %gui osx # enable Cocoa event loop integration # (requires %matplotlib 1.1) %gui # disable all event loop integration
WARNING: after any of these has been called you can simply create an application object, but DO NOT start the event loop yourself, as we have already handled that.
Aliases
-
IPython.core.magics.BasicMagics.gui