##// END OF EJS Templates
Added embedded configuration to docs
Erich Spaker -
Show More
@@ -112,6 +112,18 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:
116
117 Configuring embedded IPython
118 ----------------------------
119
120 If you are :ref:`Embedding`, you can set configuration options the same
121 way as in a config file by creating a traitlets config object and passing
122 it to start_ipython like in the example below.
123
124 .. literalinclude:: ../../../examples/Embedding/embed_configured.py
125 :language: python
126
115 .. _profiles:
127 .. _profiles:
116
128
117 Profiles
129 Profiles
@@ -671,6 +671,9 b' code fragments in your programs which are ready for cut and paste:'
671 .. literalinclude:: ../../../examples/Embedding/embed_class_short.py
671 .. literalinclude:: ../../../examples/Embedding/embed_class_short.py
672 :language: python
672 :language: python
673
673
674 For more information on setting configuration options for an embedded
675 IPython instance, see :ref:`configure_embedded`.
676
674 Using the Python debugger (pdb)
677 Using the Python debugger (pdb)
675 ===============================
678 ===============================
676
679
@@ -6,7 +6,7 b' c = Config()'
6
6
7 # Now we can set options as we would in a config file:
7 # Now we can set options as we would in a config file:
8 # c.Class.config_value = value
8 # c.Class.config_value = value
9 # For, example, we can set the exec_lines option of the InteractiveShellApp
9 # For example, we can set the exec_lines option of the InteractiveShellApp
10 # class to run some code when the IPython REPL starts
10 # class to run some code when the IPython REPL starts
11 c.InteractiveShellApp.exec_lines = [
11 c.InteractiveShellApp.exec_lines = [
12 'print("\\nimporting some things\\n")',
12 'print("\\nimporting some things\\n")',
@@ -17,6 +17,6 b" c.InteractiveShell.colors = 'LightBG'"
17 c.InteractiveShell.confirm_exit = False
17 c.InteractiveShell.confirm_exit = False
18 c.TerminalIPythonApp.display_banner = False
18 c.TerminalIPythonApp.display_banner = False
19
19
20 # Now we start ipython with our configurtion
20 # Now we start ipython with our configuration
21 import IPython
21 import IPython
22 IPython.start_ipython(config=c)
22 IPython.start_ipython(config=c)
General Comments 0
You need to be logged in to leave comments. Login now