##// END OF EJS Templates
Polishing some docs
Thomas Kluyver -
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 ``$IPYTHONDIR/extensions/``.
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 ``sys.path`` automatically.
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,9 +20,9 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 "ipython_config.py" or
23 files for each profile, and the files look like :file:`ipython_config.py` or
28 "ipython_config_<frontendname>.py". Profile directories look like
24 :file:`ipython_config_{frontendname}.py`. Profile directories look like
29 "profile_profilename" and are typically installed in the IPYTHONDIR directory,
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:\\Documents and Settings\\YourUserName` in most
27 resolves to :file:`C:\\Documents and Settings\\YourUserName` in most
32 instances.
28 instances.
@@ -165,6 +161,8 b' An example (with automagic on) should clarify all this:'
165
161
166 /home/fperez/ipython
162 /home/fperez/ipython
167
163
164 .. _defining_magics:
165
168 Defining your own magics
166 Defining your own magics
169 ++++++++++++++++++++++++
167 ++++++++++++++++++++++++
170
168
General Comments 0
You need to be logged in to leave comments. Login now