Show More
@@ -112,16 +112,17 b' At present, this only affects the current session - changes you make to' | |||||
112 | config are not saved anywhere. Also, some options are only read when |
|
112 | config are not saved anywhere. Also, some options are only read when | |
113 | IPython starts, so they can't be changed like this. |
|
113 | IPython starts, so they can't be changed like this. | |
114 |
|
114 | |||
115 | .. _configure_embedded: |
|
115 | .. _configure_start_ipython: | |
116 |
|
116 | |||
117 | Configuring embedded IPython |
|
117 | Running IPython from Python | |
118 | ---------------------------- |
|
118 | ---------------------------- | |
119 |
|
119 | |||
120 | If you are :ref:`Embedding`, you can set configuration options the same |
|
120 | If you are using :ref:`embedding` to start IPython from a normal | |
121 | way as in a config file by creating a traitlets config object and passing |
|
121 | python file, you can set configuration options the same way as in a | |
122 | it to start_ipython like in the example below. |
|
122 | config file by creating a traitlets config object and passing it to | |
|
123 | start_ipython like in the example below. | |||
123 |
|
124 | |||
124 |
.. literalinclude:: ../../../examples/Embedding/ |
|
125 | .. literalinclude:: ../../../examples/Embedding/start_ipython_config.py | |
125 | :language: python |
|
126 | :language: python | |
126 |
|
127 | |||
127 | .. _profiles: |
|
128 | .. _profiles: |
@@ -604,6 +604,8 b' You can start a regular IPython session with' | |||||
604 |
|
604 | |||
605 | at any point in your program. This will load IPython configuration, |
|
605 | at any point in your program. This will load IPython configuration, | |
606 | startup files, and everything, just as if it were a normal IPython session. |
|
606 | startup files, and everything, just as if it were a normal IPython session. | |
|
607 | For information on setting configuration options when running IPython from | |||
|
608 | python, see :ref:`configure_start_ipython`. | |||
607 |
|
609 | |||
608 | It is also possible to embed an IPython shell in a namespace in your Python code. |
|
610 | It is also possible to embed an IPython shell in a namespace in your Python code. | |
609 | This allows you to evaluate dynamically the state of your code, |
|
611 | This allows you to evaluate dynamically the state of your code, | |
@@ -671,9 +673,6 b' code fragments in your programs which are ready for cut and paste:' | |||||
671 | .. literalinclude:: ../../../examples/Embedding/embed_class_short.py |
|
673 | .. literalinclude:: ../../../examples/Embedding/embed_class_short.py | |
672 | :language: python |
|
674 | :language: python | |
673 |
|
675 | |||
674 | For more information on setting configuration options for an embedded |
|
|||
675 | IPython instance, see :ref:`configure_embedded`. |
|
|||
676 |
|
||||
677 | Using the Python debugger (pdb) |
|
676 | Using the Python debugger (pdb) | |
678 | =============================== |
|
677 | =============================== | |
679 |
|
678 |
@@ -1,4 +1,4 b'' | |||||
1 |
"""Quick snippet explaining how to set config options when |
|
1 | """Quick snippet explaining how to set config options when using start_ipython.""" | |
2 |
|
2 | |||
3 | # First create a config object from the traitlets library |
|
3 | # First create a config object from the traitlets library | |
4 | from traitlets.config import Config |
|
4 | from traitlets.config import Config |
General Comments 0
You need to be logged in to leave comments.
Login now