31
31
dynamic object introspection, easier configuration, command
32
32
completion, access to the system shell, integration with numerical and
33
33
scientific computing tools, and more.
34
.SH SPECIAL THREADING OPTIONS
35
The following special options are ONLY valid at the beginning of the command
36
line, and not later. This is because they control the initialization of
37
ipython itself, before the normal option-handling mechanism is active.
39
.B \-gthread, \-qthread, \-q4thread, \-wthread, \-pylab
40
Only ONE of these can be given, and it can only be given as the first option
41
passed to IPython (it will have no effect in any other position). They provide
42
threading support for the GTK, QT3, QT4 and WXWidgets toolkits, for the
43
matplotlib library and Twisted reactor.
46
With any of the first four options, IPython starts running a separate thread
47
for the graphical toolkit's operation, so that you can open and control
48
graphical elements from within an IPython command line, without blocking. All
49
four provide essentially the same functionality, respectively for GTK, QT3, QT4
50
and WXWidgets (via their Python interfaces).
53
Note that with \-wthread, you can additionally use the \-wxversion option to
54
request a specific version of wx to be used. This requires that you have the
55
wxversion Python module installed, which is part of recent wxPython
59
If \-pylab is given, IPython loads special support for the matplotlib library
60
(http://matplotlib.sourceforge.net), allowing interactive usage of any of its
61
backends as defined in the user's .matplotlibrc file. It automatically
62
activates GTK, QT or WX threading for IPyhton if the choice of matplotlib
63
backend requires it. It also modifies the %run command to correctly execute
64
(without blocking) any matplotlib-based script which calls show() at the end.
67
The \-g/q/q4/wthread options, and \-pylab (if matplotlib is configured to use
68
GTK, QT or WX), will normally block Tk graphical interfaces. This means that
69
when GTK, QT or WX threading is active, any attempt to open a Tk GUI will
70
result in a dead window, and possibly cause the Python interpreter to crash.
71
An extra option, \-tk, is available to address this issue. It can ONLY be
72
given as a SECOND option after any of the above (\-gthread, \-qthread,
73
\-wthread or \-pylab).
76
If \-tk is given, IPython will try to coordinate Tk threading with GTK, QT or
77
WX. This is however potentially unreliable, and you will have to test on your
78
platform and Python configuration to determine whether it works for you.
79
Debian users have reported success, apparently due to the fact that Debian
80
builds all of Tcl, Tk, Tkinter and Python with pthreads support. Under other
81
Linux environments (such as Fedora Core 2), this option has caused random
82
crashes and lockups of the Python interpreter. Under other operating systems
83
(Mac OSX and Windows), you'll need to try it to find out, since currently no
84
user reports are available.
87
There is unfortunately no way for IPython to determine at runtime whether \-tk
88
will work reliably or not, so you will need to do some experiments before
89
relying on it for regular work.
91
35
.SH REGULAR OPTIONS
92
36
After the above threading options have been given, regular options can follow