From 51ae2f6821d60a481290ba7893b615c6e8e52ee3 2017-08-02 18:09:57 From: Erich Spaker Date: 2017-08-02 18:09:57 Subject: [PATCH] fixed inaccurate references to "embedding" --- diff --git a/docs/source/config/intro.rst b/docs/source/config/intro.rst index c79b70f..af8bc79 100644 --- a/docs/source/config/intro.rst +++ b/docs/source/config/intro.rst @@ -112,16 +112,17 @@ At present, this only affects the current session - changes you make to config are not saved anywhere. Also, some options are only read when IPython starts, so they can't be changed like this. -.. _configure_embedded: +.. _configure_start_ipython: -Configuring embedded IPython +Running IPython from Python ---------------------------- -If you are :ref:`Embedding`, you can set configuration options the same -way as in a config file by creating a traitlets config object and passing -it to start_ipython like in the example below. +If you are using :ref:`embedding` to start IPython from a normal +python file, you can set configuration options the same way as in a +config file by creating a traitlets config object and passing it to +start_ipython like in the example below. -.. literalinclude:: ../../../examples/Embedding/embed_configured.py +.. literalinclude:: ../../../examples/Embedding/start_ipython_config.py :language: python .. _profiles: diff --git a/docs/source/interactive/reference.rst b/docs/source/interactive/reference.rst index ec2d6d1..ef49565 100644 --- a/docs/source/interactive/reference.rst +++ b/docs/source/interactive/reference.rst @@ -604,6 +604,8 @@ You can start a regular IPython session with at any point in your program. This will load IPython configuration, startup files, and everything, just as if it were a normal IPython session. +For information on setting configuration options when running IPython from +python, see :ref:`configure_start_ipython`. It is also possible to embed an IPython shell in a namespace in your Python code. This allows you to evaluate dynamically the state of your code, @@ -671,9 +673,6 @@ code fragments in your programs which are ready for cut and paste: .. literalinclude:: ../../../examples/Embedding/embed_class_short.py :language: python -For more information on setting configuration options for an embedded -IPython instance, see :ref:`configure_embedded`. - Using the Python debugger (pdb) =============================== diff --git a/examples/Embedding/embed_configured.py b/examples/Embedding/start_ipython_config.py similarity index 92% rename from examples/Embedding/embed_configured.py rename to examples/Embedding/start_ipython_config.py index 8f9138a..f1fbaca 100755 --- a/examples/Embedding/embed_configured.py +++ b/examples/Embedding/start_ipython_config.py @@ -1,4 +1,4 @@ -"""Quick snippet explaining how to set config options when embedding ipython.""" +"""Quick snippet explaining how to set config options when using start_ipython.""" # First create a config object from the traitlets library from traitlets.config import Config