Show More
@@ -7,7 +7,7 b' IPython extensions' | |||||
7 | A level above configuration are IPython extensions, Python modules which modify |
|
7 | A level above configuration are IPython extensions, Python modules which modify | |
8 | the behaviour of the shell. They are referred to by an importable module name, |
|
8 | the behaviour of the shell. They are referred to by an importable module name, | |
9 | and can be placed anywhere you'd normally import from, or in |
|
9 | and can be placed anywhere you'd normally import from, or in | |
10 |
`` |
|
10 | ``.ipython/extensions/``. | |
11 |
|
11 | |||
12 | Getting extensions |
|
12 | Getting extensions | |
13 | ================== |
|
13 | ================== | |
@@ -61,11 +61,15 b' Useful :class:`InteractiveShell` methods include :meth:`~IPython.core.interactiv' | |||||
61 | :meth:`~IPython.core.interactiveshell.InteractiveShell.push` (to add variables to the user namespace) and |
|
61 | :meth:`~IPython.core.interactiveshell.InteractiveShell.push` (to add variables to the user namespace) and | |
62 | :meth:`~IPython.core.interactiveshell.InteractiveShell.drop_by_id` (to remove variables on unloading). |
|
62 | :meth:`~IPython.core.interactiveshell.InteractiveShell.drop_by_id` (to remove variables on unloading). | |
63 |
|
63 | |||
|
64 | .. seealso:: | |||
|
65 | ||||
|
66 | :ref:`defining_magics` | |||
|
67 | ||||
64 | You can put your extension modules anywhere you want, as long as they can be |
|
68 | You can put your extension modules anywhere you want, as long as they can be | |
65 | imported by Python's standard import mechanism. However, to make it easy to |
|
69 | imported by Python's standard import mechanism. However, to make it easy to | |
66 | write extensions, you can also put your extensions in |
|
70 | write extensions, you can also put your extensions in :file:`extensions/` | |
67 | ``os.path.join(ip.ipython_dir, 'extensions')``. This directory is added to |
|
71 | within the :ref:`IPython directory <ipythondir>`. This directory is | |
68 |
|
|
72 | added to :data:`sys.path` automatically. | |
69 |
|
73 | |||
70 | When your extension is ready for general use, please add it to the `extensions |
|
74 | When your extension is ready for general use, please add it to the `extensions | |
71 | index <https://github.com/ipython/ipython/wiki/Extensions-Index>`_. |
|
75 | index <https://github.com/ipython/ipython/wiki/Extensions-Index>`_. |
@@ -11,10 +11,6 b' You start IPython with the command::' | |||||
11 |
|
11 | |||
12 | $ ipython [options] files |
|
12 | $ ipython [options] files | |
13 |
|
13 | |||
14 | .. note:: |
|
|||
15 |
|
||||
16 | For IPython on Python 3, use ``ipython3`` in place of ``ipython``. |
|
|||
17 |
|
||||
18 | If invoked with no options, it executes all the files listed in sequence |
|
14 | If invoked with no options, it executes all the files listed in sequence | |
19 | and drops you into the interpreter while still acknowledging any options |
|
15 | and drops you into the interpreter while still acknowledging any options | |
20 | you may have set in your ipython_config.py. This behavior is different from |
|
16 | you may have set in your ipython_config.py. This behavior is different from | |
@@ -24,12 +20,11 b' file and ignore your configuration setup.' | |||||
24 | Please note that some of the configuration options are not available at |
|
20 | Please note that some of the configuration options are not available at | |
25 | the command line, simply because they are not practical here. Look into |
|
21 | the command line, simply because they are not practical here. Look into | |
26 | your configuration files for details on those. There are separate configuration |
|
22 | your configuration files for details on those. There are separate configuration | |
27 |
files for each profile, and the files look like |
|
23 | files for each profile, and the files look like :file:`ipython_config.py` or | |
28 |
|
|
24 | :file:`ipython_config_{frontendname}.py`. Profile directories look like | |
29 |
|
|
25 | :file:`profile_{profilename}` and are typically installed in the :envvar:`IPYTHONDIR` directory, | |
30 | which defaults to :file:`$HOME/.ipython`. For Windows users, :envvar:`HOME` |
|
26 | which defaults to :file:`$HOME/.ipython`. For Windows users, :envvar:`HOME` | |
31 |
resolves to :file:`C:\\ |
|
27 | resolves to :file:`C:\\Users\\{YourUserName}` in most instances. | |
32 | instances. |
|
|||
33 |
|
28 | |||
34 |
|
29 | |||
35 | Eventloop integration |
|
30 | Eventloop integration | |
@@ -165,6 +160,8 b' An example (with automagic on) should clarify all this:' | |||||
165 |
|
160 | |||
166 | /home/fperez/ipython |
|
161 | /home/fperez/ipython | |
167 |
|
162 | |||
|
163 | .. _defining_magics: | |||
|
164 | ||||
168 | Defining your own magics |
|
165 | Defining your own magics | |
169 | ++++++++++++++++++++++++ |
|
166 | ++++++++++++++++++++++++ | |
170 |
|
167 |
General Comments 0
You need to be logged in to leave comments.
Login now