##// END OF EJS Templates
minor edits
Paul Ivanov -
Show More
@@ -32,7 +32,7 b' tutorial but should usually not impact the computation.'
32 32
33 33 You should be able to type single line expressions and press enter to evaluate
34 34 them. If an expression is incomplete, IPython will automatically detect this and
35 add a new line when you press ``Enter`` instead of executing right away.
35 add a new line when you press :kbd:`Enter` instead of executing right away.
36 36
37 37 Feel free to explore multi-line text input. Unlike many other REPLs, with
38 38 IPython you can use the up and down arrow keys when editing multi-line
@@ -56,13 +56,13 b' the standard Python REPL. First, your code should be syntax-highlighted as you'
56 56 type. Second, you will see that some results will have an ``Out[N]:`` prompt,
57 57 while some other do not. We'll come to this later.
58 58
59 Depending on the exact command you are typing you might realize that sometime
60 the :key:`Enter` will add a new line, and sometime it will execute the current
59 Depending on the exact command you are typing you might realize that sometimes
60 :kbd:`Enter` will add a new line, and sometimes it will execute the current
61 61 statement. IPython tries to guess what you are doing, so most of the time you
62 62 should not have to care. Though if by any chance IPython does not the right
63 63 thing you can force execution of the current code block by pressing in sequence
64 :key:`Esc` and :key:`Enter`. You can also force the insertion of a new line at
65 the position of the cursor by using `Ctrl-O`.
64 :kbd:`Esc` and :kbd:`Enter`. You can also force the insertion of a new line at
65 the position of the cursor by using :kbd:`Ctrl-o`.
66 66
67 67 The four most helpful commands
68 68 ==============================
@@ -88,18 +88,18 b" to view the object's attributes. Besides Python objects and keywords, tab"
88 88 completion also works on file and directory names.
89 89
90 90 Starting with IPython 6.0, if ``jedi`` is installed, IPython will try to pull
91 completions from Jedi as well. This allow to not only inspect currently
91 completions from Jedi as well. This allows to not only inspect currently
92 92 existing objects, but also to infer completion statically without executing
93 code. There is nothing particular to do this to work, simply use tab
94 completion on more complex expression like the following::
93 code. There is nothing particular need to get this to work, simply use tab
94 completion on more complex expressions like the following::
95 95
96 96 >>> data = ['Number of users', 123_456]
97 97 ... data[0].<tab>
98 98
99 99 IPython and Jedi will be able to infer that ``data[0]`` is actually a string
100 100 and should show relevant completions like ``upper()``, ``lower()`` and other
101 string methods. You can use the Tab key to cycle through completions, and while
102 a completion is highlighted, its type will be shown as well.
101 string methods. You can use the :kbd:`Tab` key to cycle through completions,
102 and while a completion is highlighted, its type will be shown as well.
103 103
104 104 Exploring your objects
105 105 ======================
@@ -127,7 +127,7 b' separate argument.'
127 127 Magics are useful as convenient functions where Python syntax is not the most
128 128 natural one, or when one want to embed invalid python syntax in their work flow.
129 129
130 The following examples show how to call the builtin :magic:`timeit` magic, both
130 The following examples show how to call the built-in :magic:`timeit` magic, both
131 131 in line and cell mode::
132 132
133 133 In [1]: %timeit range(1000)
@@ -138,7 +138,7 b' in line and cell mode::'
138 138 ...:
139 139 1000 loops, best of 3: 223 us per loop
140 140
141 The builtin magics include:
141 The built-in magics include:
142 142
143 143 - Functions that work with code: :magic:`run`, :magic:`edit`, :magic:`save`,
144 144 :magic:`macro`, :magic:`recall`, etc.
@@ -184,7 +184,7 b' imported modules, which have to be specifically reloaded). IPython also includes'
184 184 for running them under the control of either Python's pdb debugger (-d) or
185 185 profiler (-p).
186 186
187 The :magic:`edit` command gives a reasonable approximation of multiline editing,
187 The :magic:`edit` command gives a reasonable approximation of multi-line editing,
188 188 by invoking your favorite editor on the spot. IPython will execute the
189 189 code you type in there as if it were typed interactively. Note that for
190 190 :magic:`edit` to work, the call to startup your editor has to be a blocking
General Comments 0
You need to be logged in to leave comments. Login now