|
@@
-4,96
+4,3
b''
|
|
4
|
4
|
|
|
5
|
5
|
This document describes in-flight development work.
|
|
6
|
6
|
|
|
7
|
|
Redesigned IPython notebook user interface
|
|
8
|
|
------------------------------------------
|
|
9
|
|
|
|
10
|
|
(Add description & screenshots of the many changes to the notebook)
|
|
11
|
|
|
|
12
|
|
Improved tooltips
|
|
13
|
|
~~~~~~~~~~~~~~~~~
|
|
14
|
|
|
|
15
|
|
The object tooltips have gained some new functionality. By pressing tab several
|
|
16
|
|
times, you can expand them to see more of a docstring, keep them visible as you
|
|
17
|
|
fill in a function's parameters, or transfer the information to the pager at the
|
|
18
|
|
bottom of the screen. For the details, look at the example notebook
|
|
19
|
|
:file:`01_notebook_introduction.ipynb`.
|
|
20
|
|
|
|
21
|
|
Cell magics
|
|
22
|
|
-----------
|
|
23
|
|
|
|
24
|
|
IPython's ``%magic`` functions have been extended to let you change the meaning
|
|
25
|
|
of a whole cell using the first line. For example, to time the execution of
|
|
26
|
|
several statements::
|
|
27
|
|
|
|
28
|
|
%%timeit x = 0 # setup
|
|
29
|
|
for i in range(100000):
|
|
30
|
|
x += i**2
|
|
31
|
|
|
|
32
|
|
This is particularly useful to integrate code in another language, and cell
|
|
33
|
|
magics already exist for shell scripts, Cython, R and Octave. Using ``%%script
|
|
34
|
|
/usr/bin/foo``, you can run a cell in any interpreter that accepts code via
|
|
35
|
|
stdin.
|
|
36
|
|
|
|
37
|
|
Another handy cell magic makes it easy to write short text files: ``%%file
|
|
38
|
|
~/save/to/here.txt``.
|
|
39
|
|
|
|
40
|
|
To allow these features, the API for magic functions has been refactored and
|
|
41
|
|
made more powerful (:ghpull:`1732`).
|
|
42
|
|
|
|
43
|
|
Tab completer improvements
|
|
44
|
|
--------------------------
|
|
45
|
|
|
|
46
|
|
Useful tab-completion based on live inspection of objects is one of the most
|
|
47
|
|
popular features of IPython. To make this process even more user-friendly, the
|
|
48
|
|
completers of both the Qt console and the Notebook have been reworked.
|
|
49
|
|
|
|
50
|
|
The Qt console comes with a new ncurses-like tab completer, activated by
|
|
51
|
|
default, which lets you cycle through the available completions by pressing tab,
|
|
52
|
|
or select a completion with the arrow keys (:ghpull:`1851`).
|
|
53
|
|
|
|
54
|
|
.. figure:: ../_static/ipy_o13_qtconsole_completer.png
|
|
55
|
|
:width: 400px
|
|
56
|
|
:alt: ncurses-like completer, with highlighted selection.
|
|
57
|
|
:align: center
|
|
58
|
|
:target: ../_static/ipy_o13_qtconsole_completer.png
|
|
59
|
|
|
|
60
|
|
The new improved Qt console's ncurses-like completer allows to easily
|
|
61
|
|
navigate thought long list of completions.
|
|
62
|
|
|
|
63
|
|
In the notebook, completions are now sourced both from object introspection and
|
|
64
|
|
analysis of surrounding code, so limited completions can be offered for
|
|
65
|
|
variables defined in the current cell, or while the kernel is busy
|
|
66
|
|
(:ghpull:`1711`).
|
|
67
|
|
|
|
68
|
|
Other new features
|
|
69
|
|
------------------
|
|
70
|
|
|
|
71
|
|
* **%install_ext**: A new magic function to install an IPython extension from
|
|
72
|
|
a URL. E.g. ``%install_ext
|
|
73
|
|
https://bitbucket.org/birkenfeld/ipython-physics/raw/default/physics.py``.
|
|
74
|
|
|
|
75
|
|
* The ``%loadpy`` magic is no longer restricted to Python files, and has been
|
|
76
|
|
renamed ``%load``. The old name remains as an alias.
|
|
77
|
|
|
|
78
|
|
* New command line arguments will help external programs find IPython folders:
|
|
79
|
|
``ipython locate`` finds the user's IPython directory, and ``ipython locate
|
|
80
|
|
profile foo`` finds the folder for the 'foo' profile (if it exists).
|
|
81
|
|
|
|
82
|
|
* The :envvar:`IPYTHON_DIR` environment variable, introduced in the Great
|
|
83
|
|
Reorganization of 0.11 and existing only in versions 0.11-0.13, has been
|
|
84
|
|
deprecated. As described in :ghissue:`1167`, the complexity and confusion of
|
|
85
|
|
migrating to this variable is not worth the aesthetic improvement. Please use
|
|
86
|
|
the historical :envvar:`IPYTHONDIR` environment variable instead.
|
|
87
|
|
|
|
88
|
|
* The default value of *interactivity* passed from
|
|
89
|
|
:meth:`~IPython.core.interactiveshell.InteractiveShell.run_cell` to
|
|
90
|
|
:meth:`~IPython.core.interactiveshell.InteractiveShell.run_ast_nodes`
|
|
91
|
|
is now configurable.
|
|
92
|
|
|
|
93
|
|
Backwards incompatible changes
|
|
94
|
|
------------------------------
|
|
95
|
|
|
|
96
|
|
* The exception :exc:`IPython.core.error.TryNext` previously accepted
|
|
97
|
|
arguments and keyword arguments to be passed to the next implementation
|
|
98
|
|
of the hook. This feature was removed as it made error message propagation
|
|
99
|
|
difficult and violated the principle of loose coupling.
|