##// END OF EJS Templates
Corrections to documentation of GUI event loop support.
Thomas Kluyver -
Show More
@@ -1158,8 +1158,8 b' left as an exercise for the reader.'
1158 1158
1159 1159 .. _gui_support:
1160 1160
1161 GUI event loop support support
1162 ==============================
1161 GUI event loop support
1162 ======================
1163 1163
1164 1164 .. versionadded:: 0.11
1165 1165 The ``%gui`` magic and :mod:`IPython.lib.inputhook`.
@@ -1179,16 +1179,15 b' advantages of this are:'
1179 1179 For users, enabling GUI event loop integration is simple. You simple use the
1180 1180 ``%gui`` magic as follows::
1181 1181
1182 %gui [-a] [GUINAME]
1182 %gui [GUINAME]
1183 1183
1184 1184 With no arguments, ``%gui`` removes all GUI support. Valid ``GUINAME``
1185 arguments are ``wx``, ``qt4``, ``gtk`` and ``tk``. The ``-a`` option will
1186 create and return a running application object for the selected GUI toolkit.
1185 arguments are ``wx``, ``qt4``, ``gtk`` and ``tk``.
1187 1186
1188 1187 Thus, to use wxPython interactively and create a running :class:`wx.App`
1189 1188 object, do::
1190 1189
1191 %gui -a wx
1190 %gui wx
1192 1191
1193 1192 For information on IPython's Matplotlib integration (and the ``pylab`` mode)
1194 1193 see :ref:`this section <matplotlib_support>`.
@@ -1233,7 +1232,7 b' PyQt and PySide'
1233 1232
1234 1233 .. attempt at explanation of the complete mess that is Qt support
1235 1234
1236 When you use ``gui=qt`` or ``pylab=qt``, IPython can work with either
1235 When you use ``--gui=qt`` or ``--pylab=qt``, IPython can work with either
1237 1236 PyQt4 or PySide. There are three options for configuration here, because
1238 1237 PyQt4 has two APIs for QString and QVariant - v1, which is the default on
1239 1238 Python 2, and the more natural v2, which is the only API supported by PySide.
@@ -1251,7 +1250,7 b' PyQt4 to use its v2 API. So if ``QT_API=pyside`` PySide will be used,'
1251 1250 and if ``QT_API=pyqt`` then PyQt4 will be used *with the v2 API* for
1252 1251 QString and QVariant, so ETS codes like MayaVi will also work with IPython.
1253 1252
1254 If you launch IPython in pylab mode with ``ipython pylab=qt``, then IPython
1253 If you launch IPython in pylab mode with ``ipython --pylab=qt``, then IPython
1255 1254 will ask matplotlib which Qt library to use (only if QT_API is *not set*),
1256 1255 via the 'backend.qt4' rcParam.
1257 1256 If matplotlib is version 1.0.1 or older, then IPython will always use PyQt4
@@ -1264,7 +1263,7 b' without setting the v2 APIs, since neither v2 PyQt nor PySide work.'
1264 1263 an incompatible mode.
1265 1264
1266 1265 It also means that you must *not* have ``QT_API`` set if you want to
1267 use ``gui=qt`` with code that requires PyQt4 API v1.
1266 use ``--gui=qt`` with code that requires PyQt4 API v1.
1268 1267
1269 1268
1270 1269
@@ -1286,7 +1285,7 b' process of working with the Matplotlib developers to finalize the new pylab'
1286 1285 API, but for now you can use Matplotlib interactively using the following
1287 1286 commands::
1288 1287
1289 %gui -a wx
1288 %gui wx
1290 1289 import matplotlib
1291 1290 matplotlib.use('wxagg')
1292 1291 from matplotlib import pylab
General Comments 0
You need to be logged in to leave comments. Login now