Show More
@@ -34,10 +34,8 b' $HOME/.ipython. For Windows users, $HOME resolves to C:\\\\Documents and' | |||||
34 | Settings\\YourUserName in most instances. |
|
34 | Settings\\YourUserName in most instances. | |
35 |
|
35 | |||
36 |
|
36 | |||
37 |
|
37 | Eventloop integration | ||
38 |
|
38 | --------------------- | ||
39 | Special Threading Options |
|
|||
40 | ------------------------- |
|
|||
41 |
|
39 | |||
42 | Previously IPython had command line options for controlling GUI event loop |
|
40 | Previously IPython had command line options for controlling GUI event loop | |
43 | integration (-gthread, -qthread, -q4thread, -wthread, -pylab). As of IPython |
|
41 | integration (-gthread, -qthread, -q4thread, -wthread, -pylab). As of IPython | |
@@ -63,13 +61,13 b' given at the command line override the values set in the ipythonrc file.' | |||||
63 | All options with a [no] prepended can be specified in negated form |
|
61 | All options with a [no] prepended can be specified in negated form | |
64 | (--no-option instead of --option) to turn the feature off. |
|
62 | (--no-option instead of --option) to turn the feature off. | |
65 |
|
63 | |||
66 | -h, --help print a help message and exit. |
|
64 | ``-h, --help`` print a help message and exit. | |
67 |
|
65 | |||
68 | --pylab, pylab=<name> |
|
66 | ``--pylab, pylab=<name>`` | |
69 | See :ref:`Matplotlib support <matplotlib_support>` |
|
67 | See :ref:`Matplotlib support <matplotlib_support>` | |
70 | for more details. |
|
68 | for more details. | |
71 |
|
69 | |||
72 | autocall=<val> |
|
70 | ``autocall=<val>`` | |
73 | Make IPython automatically call any callable object even if you |
|
71 | Make IPython automatically call any callable object even if you | |
74 | didn't type explicit parentheses. For example, 'str 43' becomes |
|
72 | didn't type explicit parentheses. For example, 'str 43' becomes | |
75 | 'str(43)' automatically. The value can be '0' to disable the feature, |
|
73 | 'str(43)' automatically. The value can be '0' to disable the feature, | |
@@ -78,25 +76,26 b' All options with a [no] prepended can be specified in negated form' | |||||
78 | objects are automatically called (even if no arguments are |
|
76 | objects are automatically called (even if no arguments are | |
79 | present). The default is '1'. |
|
77 | present). The default is '1'. | |
80 |
|
78 | |||
81 |
--[no-]autoindent |
|
79 | ``--[no-]autoindent`` | |
82 | Turn automatic indentation on/off. |
|
80 | Turn automatic indentation on/off. | |
83 |
|
81 | |||
84 |
--[no-]automagic |
|
82 | ``--[no-]automagic`` | |
85 | make magic commands automatic (without needing their first character |
|
83 | make magic commands automatic (without needing their first character | |
86 | to be %). Type %magic at the IPython prompt for more information. |
|
84 | to be %). Type %magic at the IPython prompt for more information. | |
87 |
|
85 | |||
88 |
--[no-]autoedit_syntax |
|
86 | ``--[no-]autoedit_syntax`` | |
89 | When a syntax error occurs after editing a file, automatically |
|
87 | When a syntax error occurs after editing a file, automatically | |
90 | open the file to the trouble causing line for convenient |
|
88 | open the file to the trouble causing line for convenient | |
91 | fixing. |
|
89 | fixing. | |
92 |
|
90 | |||
93 | --[no-]banner Print the initial information banner (default on). |
|
91 | ``--[no-]banner`` | |
|
92 | Print the initial information banner (default on). | |||
94 |
|
93 | |||
95 | c=<command> |
|
94 | ``c=<command>`` | |
96 | execute the given command string. This is similar to the -c |
|
95 | execute the given command string. This is similar to the -c | |
97 | option in the normal Python interpreter. |
|
96 | option in the normal Python interpreter. | |
98 |
|
97 | |||
99 |
cache_size=<n> |
|
98 | ``cache_size=<n>`` | |
100 | size of the output cache (maximum number of entries to hold in |
|
99 | size of the output cache (maximum number of entries to hold in | |
101 | memory). The default is 1000, you can change it permanently in your |
|
100 | memory). The default is 1000, you can change it permanently in your | |
102 | config file. Setting it to 0 completely disables the caching system, |
|
101 | config file. Setting it to 0 completely disables the caching system, | |
@@ -105,15 +104,15 b' All options with a [no] prepended can be specified in negated form' | |||||
105 | because otherwise you'll spend more time re-flushing a too small cache |
|
104 | because otherwise you'll spend more time re-flushing a too small cache | |
106 | than working. |
|
105 | than working. | |
107 |
|
106 | |||
108 | --classic |
|
107 | ``--classic`` | |
109 | Gives IPython a similar feel to the classic Python |
|
108 | Gives IPython a similar feel to the classic Python | |
110 | prompt. |
|
109 | prompt. | |
111 |
|
110 | |||
112 |
colors=<scheme> |
|
111 | ``colors=<scheme>`` | |
113 | Color scheme for prompts and exception reporting. Currently |
|
112 | Color scheme for prompts and exception reporting. Currently | |
114 | implemented: NoColor, Linux and LightBG. |
|
113 | implemented: NoColor, Linux and LightBG. | |
115 |
|
114 | |||
116 |
--[no-]color_info |
|
115 | ``--[no-]color_info`` | |
117 | IPython can display information about objects via a set of functions, |
|
116 | IPython can display information about objects via a set of functions, | |
118 | and optionally can use colors for this, syntax highlighting source |
|
117 | and optionally can use colors for this, syntax highlighting source | |
119 | code and various other elements. However, because this information is |
|
118 | code and various other elements. However, because this information is | |
@@ -127,12 +126,12 b' All options with a [no] prepended can be specified in negated form' | |||||
127 | system. The magic function %color_info allows you to toggle this |
|
126 | system. The magic function %color_info allows you to toggle this | |
128 | interactively for testing. |
|
127 | interactively for testing. | |
129 |
|
128 | |||
130 |
--[no-]debug |
|
129 | ``--[no-]debug`` | |
131 | Show information about the loading process. Very useful to pin down |
|
130 | Show information about the loading process. Very useful to pin down | |
132 | problems with your configuration files or to get details about |
|
131 | problems with your configuration files or to get details about | |
133 | session restores. |
|
132 | session restores. | |
134 |
|
133 | |||
135 |
--[no-]deep_reload |
|
134 | ``--[no-]deep_reload`` | |
136 | IPython can use the deep_reload module which reloads changes in |
|
135 | IPython can use the deep_reload module which reloads changes in | |
137 | modules recursively (it replaces the reload() function, so you don't |
|
136 | modules recursively (it replaces the reload() function, so you don't | |
138 | need to change anything to use it). deep_reload() forces a full |
|
137 | need to change anything to use it). deep_reload() forces a full | |
@@ -144,7 +143,7 b' All options with a [no] prepended can be specified in negated form' | |||||
144 | feature is off by default [which means that you have both |
|
143 | feature is off by default [which means that you have both | |
145 | normal reload() and dreload()]. |
|
144 | normal reload() and dreload()]. | |
146 |
|
145 | |||
147 | editor=<name> |
|
146 | ``editor=<name>`` | |
148 | Which editor to use with the %edit command. By default, |
|
147 | Which editor to use with the %edit command. By default, | |
149 | IPython will honor your EDITOR environment variable (if not |
|
148 | IPython will honor your EDITOR environment variable (if not | |
150 | set, vi is the Unix default and notepad the Windows one). |
|
149 | set, vi is the Unix default and notepad the Windows one). | |
@@ -153,22 +152,25 b' All options with a [no] prepended can be specified in negated form' | |||||
153 | small, lightweight editor here (in case your default EDITOR is |
|
152 | small, lightweight editor here (in case your default EDITOR is | |
154 | something like Emacs). |
|
153 | something like Emacs). | |
155 |
|
154 | |||
156 |
ipython_dir=<name> |
|
155 | ``ipython_dir=<name>`` | |
157 | name of your IPython configuration directory IPYTHON_DIR. This |
|
156 | name of your IPython configuration directory IPYTHON_DIR. This | |
158 | can also be specified through the environment variable |
|
157 | can also be specified through the environment variable | |
159 | IPYTHON_DIR. |
|
158 | IPYTHON_DIR. | |
160 |
|
159 | |||
161 | -log, l |
|
160 | ``logfile=<name>`` | |
162 | generate a log file of all input. The file is named |
|
161 | specify the name of your logfile. | |
163 | ipython_log.py in your current directory (which prevents logs |
|
162 | ||
164 | from multiple IPython sessions from trampling each other). You |
|
163 | This implies ``%logstart`` at the beginning of your session | |
165 | can use this to later restore a session by loading your |
|
164 | ||
166 | logfile as a file to be executed with option -logplay (see |
|
165 | generate a log file of all input. The file is named | |
167 | below). |
|
166 | ipython_log.py in your current directory (which prevents logs | |
168 |
|
167 | from multiple IPython sessions from trampling each other). You | ||
169 | logfile=<name> specify the name of your logfile. |
|
168 | can use this to later restore a session by loading your | |
170 |
|
169 | logfile with ``ipython --i ipython_log.py`` | ||
171 | logplay=<name> |
|
170 | ||
|
171 | ``logplay=<name>`` | |||
|
172 | ||||
|
173 | NOT AVAILABLE in 0.11 | |||
172 |
|
174 | |||
173 | you can replay a previous log. For restoring a session as close as |
|
175 | you can replay a previous log. For restoring a session as close as | |
174 | possible to the state you left it in, use this option (don't just run |
|
176 | possible to the state you left it in, use this option (don't just run | |
@@ -190,31 +192,32 b' All options with a [no] prepended can be specified in negated form' | |||||
190 | our first attempts failed because of inherent limitations of |
|
192 | our first attempts failed because of inherent limitations of | |
191 | Python's Pickle module, so this may have to wait. |
|
193 | Python's Pickle module, so this may have to wait. | |
192 |
|
194 | |||
193 |
--[no-]messages |
|
195 | ``--[no-]messages`` | |
194 | Print messages which IPython collects about its startup |
|
196 | Print messages which IPython collects about its startup | |
195 | process (default on). |
|
197 | process (default on). | |
196 |
|
198 | |||
197 | --[no-]pdb |
|
199 | ``--[no-]pdb`` | |
198 | Automatically call the pdb debugger after every uncaught |
|
200 | Automatically call the pdb debugger after every uncaught | |
199 | exception. If you are used to debugging using pdb, this puts |
|
201 | exception. If you are used to debugging using pdb, this puts | |
200 | you automatically inside of it after any call (either in |
|
202 | you automatically inside of it after any call (either in | |
201 | IPython or in code called by it) which triggers an exception |
|
203 | IPython or in code called by it) which triggers an exception | |
202 | which goes uncaught. |
|
204 | which goes uncaught. | |
203 |
|
205 | |||
204 | --[no-]pprint |
|
206 | ``--[no-]pprint`` | |
205 | ipython can optionally use the pprint (pretty printer) module |
|
207 | ipython can optionally use the pprint (pretty printer) module | |
206 | for displaying results. pprint tends to give a nicer display |
|
208 | for displaying results. pprint tends to give a nicer display | |
207 | of nested data structures. If you like it, you can turn it on |
|
209 | of nested data structures. If you like it, you can turn it on | |
208 | permanently in your config file (default off). |
|
210 | permanently in your config file (default off). | |
209 |
|
211 | |||
210 | profile=<name> |
|
212 | ``profile=<name>`` | |
211 |
|
213 | |||
212 |
|
|
214 | Select the IPython profile by name. | |
213 |
|
215 | |||
214 |
|
|
216 | This is a quick way to keep and load multiple | |
215 | config files for different tasks, especially if you use the |
|
217 | config files for different tasks, especially if you use the | |
216 | include option of config files. You can keep a basic |
|
218 | include option of config files. You can keep a basic | |
217 | IPYTHON_DIR/ipythonrc file and then have other 'profiles' which |
|
219 | :file:`IPYTHON_DIR/profile_default/ipython_config.py` file | |
|
220 | and then have other 'profiles' which | |||
218 | include this one and load extra things for particular |
|
221 | include this one and load extra things for particular | |
219 | tasks. For example: |
|
222 | tasks. For example: | |
220 |
|
223 | |||
@@ -226,16 +229,16 b' All options with a [no] prepended can be specified in negated form' | |||||
226 | circular file inclusions, IPython will stop if it reaches 15 |
|
229 | circular file inclusions, IPython will stop if it reaches 15 | |
227 | recursive inclusions. |
|
230 | recursive inclusions. | |
228 |
|
231 | |||
229 | InteractiveShell.prompt_in1=<string> |
|
232 | ``InteractiveShell.prompt_in1=<string>`` | |
230 |
|
233 | |||
231 |
|
|
234 | Specify the string used for input prompts. Note that if you are using | |
232 | numbered prompts, the number is represented with a '\#' in the |
|
235 | numbered prompts, the number is represented with a '\#' in the | |
233 | string. Don't forget to quote strings with spaces embedded in |
|
236 | string. Don't forget to quote strings with spaces embedded in | |
234 | them. Default: 'In [\#]:'. The :ref:`prompts section <prompts>` |
|
237 | them. Default: 'In [\#]:'. The :ref:`prompts section <prompts>` | |
235 | discusses in detail all the available escapes to customize your |
|
238 | discusses in detail all the available escapes to customize your | |
236 | prompts. |
|
239 | prompts. | |
237 |
|
240 | |||
238 | InteractiveShell.prompt_in2=<string> |
|
241 | ``InteractiveShell.prompt_in2=<string>`` | |
239 | Similar to the previous option, but used for the continuation |
|
242 | Similar to the previous option, but used for the continuation | |
240 | prompts. The special sequence '\D' is similar to '\#', but |
|
243 | prompts. The special sequence '\D' is similar to '\#', but | |
241 | with all digits replaced dots (so you can have your |
|
244 | with all digits replaced dots (so you can have your | |
@@ -243,14 +246,14 b' All options with a [no] prepended can be specified in negated form' | |||||
243 | ' .\D.:' (note three spaces at the start for alignment with |
|
246 | ' .\D.:' (note three spaces at the start for alignment with | |
244 | 'In [\#]'). |
|
247 | 'In [\#]'). | |
245 |
|
248 | |||
246 |
InteractiveShell.prompt_out=<string> |
|
249 | ``InteractiveShell.prompt_out=<string>`` | |
247 | String used for output prompts, also uses numbers like |
|
250 | String used for output prompts, also uses numbers like | |
248 | prompt_in1. Default: 'Out[\#]:' |
|
251 | prompt_in1. Default: 'Out[\#]:' | |
249 |
|
252 | |||
250 | --quick |
|
253 | ``--quick`` | |
251 | start in bare bones mode (no config file loaded). |
|
254 | start in bare bones mode (no config file loaded). | |
252 |
|
255 | |||
253 |
config_file=<name> |
|
256 | ``config_file=<name>`` | |
254 | name of your IPython resource configuration file. Normally |
|
257 | name of your IPython resource configuration file. Normally | |
255 | IPython loads ipython_config.py (from current directory) or |
|
258 | IPython loads ipython_config.py (from current directory) or | |
256 | IPYTHON_DIR/profile_default. |
|
259 | IPYTHON_DIR/profile_default. | |
@@ -258,7 +261,7 b' All options with a [no] prepended can be specified in negated form' | |||||
258 | If the loading of your config file fails, IPython starts with |
|
261 | If the loading of your config file fails, IPython starts with | |
259 | a bare bones configuration (no modules loaded at all). |
|
262 | a bare bones configuration (no modules loaded at all). | |
260 |
|
263 | |||
261 | --[no-]readline |
|
264 | ``--[no-]readline`` | |
262 | use the readline library, which is needed to support name |
|
265 | use the readline library, which is needed to support name | |
263 | completion and command history, among other things. It is |
|
266 | completion and command history, among other things. It is | |
264 | enabled by default, but may cause problems for users of |
|
267 | enabled by default, but may cause problems for users of | |
@@ -268,7 +271,7 b' All options with a [no] prepended can be specified in negated form' | |||||
268 | IPython's readline and syntax coloring fine, only 'emacs' (M-x |
|
271 | IPython's readline and syntax coloring fine, only 'emacs' (M-x | |
269 | shell and C-c !) buffers do not. |
|
272 | shell and C-c !) buffers do not. | |
270 |
|
273 | |||
271 | TerminalInteractiveShell.screen_length=<n> |
|
274 | ``TerminalInteractiveShell.screen_length=<n>`` | |
272 | number of lines of your screen. This is used to control |
|
275 | number of lines of your screen. This is used to control | |
273 | printing of very long strings. Strings longer than this number |
|
276 | printing of very long strings. Strings longer than this number | |
274 | of lines will be sent through a pager instead of directly |
|
277 | of lines will be sent through a pager instead of directly | |
@@ -281,35 +284,35 b' All options with a [no] prepended can be specified in negated form' | |||||
281 | reason this isn't working well (it needs curses support), specify |
|
284 | reason this isn't working well (it needs curses support), specify | |
282 | it yourself. Otherwise don't change the default. |
|
285 | it yourself. Otherwise don't change the default. | |
283 |
|
286 | |||
284 | TerminalInteractiveShell.separate_in=<string> |
|
287 | ``TerminalInteractiveShell.separate_in=<string>`` | |
285 |
|
288 | |||
286 | separator before input prompts. |
|
289 | separator before input prompts. | |
287 | Default: '\n' |
|
290 | Default: '\n' | |
288 |
|
291 | |||
289 |
TerminalInteractiveShell.separate_out=<string> |
|
292 | ``TerminalInteractiveShell.separate_out=<string>`` | |
290 | separator before output prompts. |
|
293 | separator before output prompts. | |
291 | Default: nothing. |
|
294 | Default: nothing. | |
292 |
|
295 | |||
293 | TerminalInteractiveShell.separate_out2=<string> |
|
296 | ``TerminalInteractiveShell.separate_out2=<string>`` | |
294 | separator after output prompts. |
|
297 | separator after output prompts. | |
295 | Default: nothing. |
|
298 | Default: nothing. | |
296 | For these three options, use the value 0 to specify no separator. |
|
299 | For these three options, use the value 0 to specify no separator. | |
297 |
|
300 | |||
298 | --nosep |
|
301 | ``--nosep`` | |
299 | shorthand for setting the above separators to empty strings. |
|
302 | shorthand for setting the above separators to empty strings. | |
300 |
|
303 | |||
301 | Simply removes all input/output separators. |
|
304 | Simply removes all input/output separators. | |
302 |
|
305 | |||
303 | --init |
|
306 | ``--init`` | |
304 | allows you to initialize a profile dir for configuration when you |
|
307 | allows you to initialize a profile dir for configuration when you | |
305 | install a new version of IPython or want to use a new profile. |
|
308 | install a new version of IPython or want to use a new profile. | |
306 | Since new versions may include new command line options or example |
|
309 | Since new versions may include new command line options or example | |
307 | files, this copies updated config files. Note that you should probably |
|
310 | files, this copies updated config files. Note that you should probably | |
308 | use %upgrade instead,it's a safer alternative. |
|
311 | use %upgrade instead,it's a safer alternative. | |
309 |
|
312 | |||
310 | --version print version information and exit. |
|
313 | ``--version`` print version information and exit. | |
311 |
|
314 | |||
312 | xmode=<modename> |
|
315 | ``xmode=<modename>`` | |
313 |
|
316 | |||
314 | Mode for exception reporting. |
|
317 | Mode for exception reporting. | |
315 |
|
318 | |||
@@ -557,11 +560,13 b' Note that there are 4 spaces between the quote marks after "M-i" above.' | |||||
557 |
|
560 | |||
558 | .. warning:: |
|
561 | .. warning:: | |
559 |
|
562 | |||
560 |
|
|
563 | Autoindent is ON by default, but it can cause problems with | |
561 | the pasting of multi-line indented code (the pasted code gets |
|
564 | the pasting of multi-line indented code (the pasted code gets | |
562 | re-indented on each line). A magic function %autoindent allows you to |
|
565 | re-indented on each line). A magic function %autoindent allows you to | |
563 | toggle it on/off at runtime. You can also disable it permanently on in |
|
566 | toggle it on/off at runtime. You can also disable it permanently on in | |
564 | your :file:`ipython_config.py` file (set TerminalInteractiveShell.autoindent=False). |
|
567 | your :file:`ipython_config.py` file (set TerminalInteractiveShell.autoindent=False). | |
|
568 | ||||
|
569 | If you want to paste multiple lines, it is recommended that you use ``%paste``. | |||
565 |
|
570 | |||
566 |
|
571 | |||
567 | Customizing readline behavior |
|
572 | Customizing readline behavior | |
@@ -607,10 +612,10 b' Session logging and restoring' | |||||
607 | ----------------------------- |
|
612 | ----------------------------- | |
608 |
|
613 | |||
609 | You can log all input from a session either by starting IPython with the |
|
614 | You can log all input from a session either by starting IPython with the | |
610 |
command line switche |
|
615 | command line switche ``logfile=foo.py`` (see :ref:`here <command_line_options>`) | |
611 | or by activating the logging at any moment with the magic function %logstart. |
|
616 | or by activating the logging at any moment with the magic function %logstart. | |
612 |
|
617 | |||
613 |
Log files can later be reloaded |
|
618 | Log files can later be reloaded by running them as scripts and IPython | |
614 | will attempt to 'replay' the log by executing all the lines in it, thus |
|
619 | will attempt to 'replay' the log by executing all the lines in it, thus | |
615 | restoring the state of a previous session. This feature is not quite |
|
620 | restoring the state of a previous session. This feature is not quite | |
616 | perfect, but can still be useful in many cases. |
|
621 | perfect, but can still be useful in many cases. | |
@@ -625,8 +630,8 b' follows:' | |||||
625 |
|
630 | |||
626 | %logstart [log_name [log_mode]] |
|
631 | %logstart [log_name [log_mode]] | |
627 |
|
632 | |||
628 | If no name is given, it defaults to a file named 'log' in your |
|
633 | If no name is given, it defaults to a file named 'ipython_log.py' in your | |
629 |
|
|
634 | current working directory, in 'rotate' mode (see below). | |
630 |
|
635 | |||
631 | '%logstart name' saves to file 'name' in 'backup' mode. It saves your |
|
636 | '%logstart name' saves to file 'name' in 'backup' mode. It saves your | |
632 | history up to that point and then continues logging. |
|
637 | history up to that point and then continues logging. | |
@@ -878,7 +883,7 b' Directory history' | |||||
878 | Your history of visited directories is kept in the global list _dh, and |
|
883 | Your history of visited directories is kept in the global list _dh, and | |
879 | the magic %cd command can be used to go to any entry in that list. The |
|
884 | the magic %cd command can be used to go to any entry in that list. The | |
880 | %dhist command allows you to view this history. Do ``cd -<TAB`` to |
|
885 | %dhist command allows you to view this history. Do ``cd -<TAB`` to | |
881 |
conven |
|
886 | conveniently view the directory history. | |
882 |
|
887 | |||
883 |
|
888 | |||
884 | Automatic parentheses and quotes |
|
889 | Automatic parentheses and quotes |
General Comments 0
You need to be logged in to leave comments.
Login now