Show More
@@ -4,12 +4,13 b' Built-in magic commands' | |||||
4 |
|
4 | |||
5 | .. note:: |
|
5 | .. note:: | |
6 |
|
6 | |||
7 |
To Jupyter users: Magics are specifi |
|
7 | To Jupyter users: Magics are specific to and provided by the IPython kernel. | |
8 | may be implementing magics but this decision is a per-kernel one. To be able |
|
8 | Whether magics are available on a kernel is a decision that is made by | |
9 | to work, Magics need to use a syntax which is not valid in the language they |
|
9 | the kernel developer on a per-kernel basis. To work properly, Magics must | |
10 | are implemented. IPython choosed the `%` as it is not a valid unary operator |
|
10 | use a syntax element which is not valid in the underlying language. For | |
11 | in Python. It is in other languages. |
|
11 | example, the IPython kernel uses the `%` syntax element for magics as `%` | |
12 |
|
12 | is not a valid unary operator in Python. While, the syntax element has | ||
|
13 | meaning in other languages. | |||
13 |
|
14 | |||
14 | Here is the help auto generated from the docstrings of all the available magics |
|
15 | Here is the help auto generated from the docstrings of all the available magics | |
15 | function that IPython ships with. |
|
16 | function that IPython ships with. |
@@ -12,7 +12,7 b' You start IPython with the command::' | |||||
12 | $ ipython [options] files |
|
12 | $ ipython [options] files | |
13 |
|
13 | |||
14 | If invoked with no options, it executes all the files listed in sequence and |
|
14 | If invoked with no options, it executes all the files listed in sequence and | |
15 | exit. If you add the ``-i`` flag, it drops you into the interpreter while still |
|
15 | exits. If you add the ``-i`` flag, it drops you into the interpreter while still | |
16 | acknowledging any options you may have set in your ``ipython_config.py``. This |
|
16 | acknowledging any options you may have set in your ``ipython_config.py``. This | |
17 | behavior is different from standard Python, which when called as python ``-i`` |
|
17 | behavior is different from standard Python, which when called as python ``-i`` | |
18 | will only execute one file and ignore your configuration setup. |
|
18 | will only execute one file and ignore your configuration setup. |
@@ -55,7 +55,7 b' command line style syntax. There are two kinds of magics, line-oriented and' | |||||
55 | cell-oriented. **Line magics** are prefixed with the ``%`` character and work |
|
55 | cell-oriented. **Line magics** are prefixed with the ``%`` character and work | |
56 | much like OS command-line calls: they get as an argument the rest of the line, |
|
56 | much like OS command-line calls: they get as an argument the rest of the line, | |
57 | where arguments are passed without parentheses or quotes. **Lines magics** can |
|
57 | where arguments are passed without parentheses or quotes. **Lines magics** can | |
58 | return results and can be use in the right and side of an assignment. **Cell |
|
58 | return results and can be used in the right hand side of an assignment. **Cell | |
59 | magics** are prefixed with a double ``%%``, and they are functions that get as |
|
59 | magics** are prefixed with a double ``%%``, and they are functions that get as | |
60 | an argument not only the rest of the line, but also the lines below it in a |
|
60 | an argument not only the rest of the line, but also the lines below it in a | |
61 | separate argument. |
|
61 | separate argument. | |
@@ -123,8 +123,8 b' profiler (-p).' | |||||
123 | The :magic:`edit` command gives a reasonable approximation of multiline editing, |
|
123 | The :magic:`edit` command gives a reasonable approximation of multiline editing, | |
124 | by invoking your favorite editor on the spot. IPython will execute the |
|
124 | by invoking your favorite editor on the spot. IPython will execute the | |
125 | code you type in there as if it were typed interactively. Note that for |
|
125 | code you type in there as if it were typed interactively. Note that for | |
126 |
:magic:`edit` to work, the call to startup your editor ha |
|
126 | :magic:`edit` to work, the call to startup your editor has to be a blocking | |
127 |
call. In a GUI environment, your editor likely have such an option. |
|
127 | call. In a GUI environment, your editor likely will have such an option. | |
128 |
|
128 | |||
129 | Debugging |
|
129 | Debugging | |
130 | --------- |
|
130 | --------- |
General Comments 0
You need to be logged in to leave comments.
Login now