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