Show More
@@ -33,25 +33,25 b' Assuming that your configuration file has the following at the top::' | |||
|
33 | 33 | |
|
34 | 34 | the following attributes can be set in the ``Global`` section. |
|
35 | 35 | |
|
36 |
:attr:`c. |
|
|
36 | :attr:`c.IPythonApp.display_banner` | |
|
37 | 37 | A boolean that determined if the banner is printer when :command:`ipython` |
|
38 | 38 | is started. |
|
39 | 39 | |
|
40 |
:attr:`c. |
|
|
40 | :attr:`c.IPythonApp.classic` | |
|
41 | 41 | A boolean that determines if IPython starts in "classic" mode. In this |
|
42 | 42 | mode, the prompts and everything mimic that of the normal :command:`python` |
|
43 | 43 | shell |
|
44 | 44 | |
|
45 |
:attr:`c. |
|
|
45 | :attr:`c.IPythonApp.nosep` | |
|
46 | 46 | A boolean that determines if there should be no blank lines between |
|
47 | 47 | prompts. |
|
48 | 48 | |
|
49 |
:attr:`c. |
|
|
49 | :attr:`c.IPythonApp.log_level` | |
|
50 | 50 | An integer that sets the detail of the logging level during the startup |
|
51 | 51 | of :command:`ipython`. The default is 30 and the possible values are |
|
52 | 52 | (0, 10, 20, 30, 40, 50). Higher is quieter and lower is more verbose. |
|
53 | 53 | |
|
54 |
:attr:`c. |
|
|
54 | :attr:`c.IPythonApp.extensions` | |
|
55 | 55 | A list of strings, each of which is an importable IPython extension. An |
|
56 | 56 | IPython extension is a regular Python module or package that has a |
|
57 | 57 | :func:`load_ipython_extension(ip)` method. This method gets called when |
@@ -66,12 +66,12 b' the following attributes can be set in the ``Global`` section.' | |||
|
66 | 66 | :func:`unload_ipython_extension` that will be called when the extension is |
|
67 | 67 | unloaded. |
|
68 | 68 | |
|
69 |
:attr:`c. |
|
|
69 | :attr:`c.IPythonApp.exec_lines` | |
|
70 | 70 | A list of strings, each of which is Python code that is run in the user's |
|
71 | 71 | namespace after IPython start. These lines can contain full IPython syntax |
|
72 | 72 | with magics, etc. |
|
73 | 73 | |
|
74 |
:attr:`c. |
|
|
74 | :attr:`c.IPythonApp.exec_files` | |
|
75 | 75 | A list of strings, each of which is the full pathname of a ``.py`` or |
|
76 | 76 | ``.ipy`` file that will be executed as IPython starts. These files are run |
|
77 | 77 | in IPython in the user's namespace. Files with a ``.py`` extension need to |
@@ -105,16 +105,16 b' attributes::' | |||
|
105 | 105 | # sample ipython_config.py |
|
106 | 106 | c = get_config() |
|
107 | 107 | |
|
108 |
c. |
|
|
109 |
c. |
|
|
110 |
c. |
|
|
108 | c.IPythonApp.display_banner = True | |
|
109 | c.IPythonApp.log_level = 20 | |
|
110 | c.IPythonApp.extensions = [ | |
|
111 | 111 | 'myextension' |
|
112 | 112 | ] |
|
113 |
c. |
|
|
113 | c.IPythonApp.exec_lines = [ | |
|
114 | 114 | 'import numpy', |
|
115 | 115 | 'import scipy' |
|
116 | 116 | ] |
|
117 |
c. |
|
|
117 | c.IPythonApp.exec_files = [ | |
|
118 | 118 | 'mycode.py', |
|
119 | 119 | 'fancy.ipy' |
|
120 | 120 | ] |
@@ -245,7 +245,7 b' So where should you put your configuration files? By default, all IPython' | |||
|
245 | 245 | applications look in the so called "IPython directory". The location of |
|
246 | 246 | this directory is determined by the following algorithm: |
|
247 | 247 | |
|
248 |
* If the `` |
|
|
248 | * If the ``ipython_dir`` command line flag is given, its value is used. | |
|
249 | 249 | |
|
250 | 250 | * If not, the value returned by :func:`IPython.utils.path.get_ipython_dir` |
|
251 | 251 | is used. This function will first look at the :envvar:`IPYTHON_DIR` |
@@ -267,7 +267,7 b' Once the location of the IPython directory has been determined, you need to' | |||
|
267 | 267 | know what filename to use for the configuration file. The basic idea is that |
|
268 | 268 | each application has its own default configuration filename. The default named |
|
269 | 269 | used by the :command:`ipython` command line program is |
|
270 |
:file:`ipython_config.py`. This value can be overriden by the `` |
|
|
270 | :file:`ipython_config.py`. This value can be overriden by the ``config_file`` | |
|
271 | 271 | command line flag. A sample :file:`ipython_config.py` file can be found |
|
272 | 272 | in :mod:`IPython.config.default.ipython_config.py`. Simple copy it to your |
|
273 | 273 | IPython directory to begin using it. |
@@ -288,7 +288,7 b" Let's start by showing how a profile is used:" | |||
|
288 | 288 | |
|
289 | 289 | .. code-block:: bash |
|
290 | 290 | |
|
291 |
$ ipython |
|
|
291 | $ ipython profile=sympy | |
|
292 | 292 | |
|
293 | 293 | This tells the :command:`ipython` command line program to get its |
|
294 | 294 | configuration from the "sympy" profile. The search path for profiles is the |
@@ -296,9 +296,9 b' same as that of regular configuration files. The only difference is that' | |||
|
296 | 296 | profiles are named in a special way. In the case above, the "sympy" profile |
|
297 | 297 | would need to have the name :file:`ipython_config_sympy.py`. |
|
298 | 298 | |
|
299 |
The general pattern is this: simply add `` |
|
|
300 |
normal configuration file name. Then load the profile by adding |
|
|
301 | profilename`` to your command line options. | |
|
299 | The general pattern is this: simply add ``<profilename>`` to the end of the | |
|
300 | normal configuration file name. Then load the profile by adding | |
|
301 | ``profile=<profilename>`` to your command line options. | |
|
302 | 302 | |
|
303 | 303 | IPython ships with some sample profiles in :mod:`IPython.config.profile`. |
|
304 | 304 | Simply copy these to your IPython directory to begin using them. |
@@ -21,7 +21,7 b' You start IPython with the command::' | |||
|
21 | 21 | |
|
22 | 22 | If invoked with no options, it executes all the files listed in sequence |
|
23 | 23 | and drops you into the interpreter while still acknowledging any options |
|
24 |
you may have set in your ipython |
|
|
24 | you may have set in your ipython_config.py. This behavior is different from | |
|
25 | 25 | standard Python, which when called as python -i will only execute one |
|
26 | 26 | file and ignore your configuration setup. |
|
27 | 27 | |
@@ -41,9 +41,12 b' Special Threading Options' | |||
|
41 | 41 | |
|
42 | 42 | Previously IPython had command line options for controlling GUI event loop |
|
43 | 43 | integration (-gthread, -qthread, -q4thread, -wthread, -pylab). As of IPython |
|
44 |
version 0.11, these have been |
|
|
44 | version 0.11, these have been removed. Please see the new ``%gui`` | |
|
45 | 45 | magic command or :ref:`this section <gui_support>` for details on the new |
|
46 | interface. | |
|
46 | interface, or specify the gui at the commandline:: | |
|
47 | ||
|
48 | $ ipython gui=qt | |
|
49 | ||
|
47 | 50 | |
|
48 | 51 | Regular Options |
|
49 | 52 | --------------- |
@@ -58,15 +61,15 b' the provided example for more details on what the options do. Options' | |||
|
58 | 61 | given at the command line override the values set in the ipythonrc file. |
|
59 | 62 | |
|
60 | 63 | All options with a [no] prepended can be specified in negated form |
|
61 | (-nooption instead of -option) to turn the feature off. | |
|
64 | (--no-option instead of --option) to turn the feature off. | |
|
62 | 65 | |
|
63 | -help print a help message and exit. | |
|
66 | -h, --help print a help message and exit. | |
|
64 | 67 | |
|
65 | -pylab | |
|
66 |
|
|
|
68 | --pylab, pylab=<name> | |
|
69 | See :ref:`Matplotlib support <matplotlib_support>` | |
|
67 | 70 | for more details. |
|
68 | 71 | |
|
69 |
|
|
|
72 | autocall=<val> | |
|
70 | 73 | Make IPython automatically call any callable object even if you |
|
71 | 74 | didn't type explicit parentheses. For example, 'str 43' becomes |
|
72 | 75 | 'str(43)' automatically. The value can be '0' to disable the feature, |
@@ -75,25 +78,25 b' All options with a [no] prepended can be specified in negated form' | |||
|
75 | 78 | objects are automatically called (even if no arguments are |
|
76 | 79 | present). The default is '1'. |
|
77 | 80 | |
|
78 | -[no]autoindent | |
|
81 | --[no-]autoindent | |
|
79 | 82 | Turn automatic indentation on/off. |
|
80 | 83 | |
|
81 | -[no]automagic | |
|
84 | --[no-]automagic | |
|
82 | 85 | make magic commands automatic (without needing their first character |
|
83 | 86 | to be %). Type %magic at the IPython prompt for more information. |
|
84 | 87 | |
|
85 | -[no]autoedit_syntax | |
|
88 | --[no-]autoedit_syntax | |
|
86 | 89 | When a syntax error occurs after editing a file, automatically |
|
87 | 90 | open the file to the trouble causing line for convenient |
|
88 | 91 | fixing. |
|
89 | 92 | |
|
90 | -[no]banner Print the initial information banner (default on). | |
|
93 | --[no-]banner Print the initial information banner (default on). | |
|
91 | 94 | |
|
92 |
|
|
|
95 | c=<command> | |
|
93 | 96 | execute the given command string. This is similar to the -c |
|
94 | 97 | option in the normal Python interpreter. |
|
95 | 98 | |
|
96 |
|
|
|
99 | cache_size=<n> | |
|
97 | 100 | size of the output cache (maximum number of entries to hold in |
|
98 | 101 | memory). The default is 1000, you can change it permanently in your |
|
99 | 102 | config file. Setting it to 0 completely disables the caching system, |
@@ -102,15 +105,15 b' All options with a [no] prepended can be specified in negated form' | |||
|
102 | 105 | because otherwise you'll spend more time re-flushing a too small cache |
|
103 | 106 | than working. |
|
104 | 107 | |
|
105 |
-classic |
|
|
108 | --classic | |
|
106 | 109 | Gives IPython a similar feel to the classic Python |
|
107 | 110 | prompt. |
|
108 | 111 | |
|
109 |
|
|
|
112 | colors=<scheme> | |
|
110 | 113 | Color scheme for prompts and exception reporting. Currently |
|
111 | 114 | implemented: NoColor, Linux and LightBG. |
|
112 | 115 | |
|
113 | -[no]color_info | |
|
116 | --[no-]color_info | |
|
114 | 117 | IPython can display information about objects via a set of functions, |
|
115 | 118 | and optionally can use colors for this, syntax highlighting source |
|
116 | 119 | code and various other elements. However, because this information is |
@@ -124,12 +127,12 b' All options with a [no] prepended can be specified in negated form' | |||
|
124 | 127 | system. The magic function %color_info allows you to toggle this |
|
125 | 128 | interactively for testing. |
|
126 | 129 | |
|
127 | -[no]debug | |
|
130 | --[no-]debug | |
|
128 | 131 | Show information about the loading process. Very useful to pin down |
|
129 | 132 | problems with your configuration files or to get details about |
|
130 | 133 | session restores. |
|
131 | 134 | |
|
132 | -[no]deep_reload: | |
|
135 | --[no-]deep_reload: | |
|
133 | 136 | IPython can use the deep_reload module which reloads changes in |
|
134 | 137 | modules recursively (it replaces the reload() function, so you don't |
|
135 | 138 | need to change anything to use it). deep_reload() forces a full |
@@ -141,7 +144,7 b' All options with a [no] prepended can be specified in negated form' | |||
|
141 | 144 | feature is off by default [which means that you have both |
|
142 | 145 | normal reload() and dreload()]. |
|
143 | 146 | |
|
144 |
|
|
|
147 | editor=<name> | |
|
145 | 148 | Which editor to use with the %edit command. By default, |
|
146 | 149 | IPython will honor your EDITOR environment variable (if not |
|
147 | 150 | set, vi is the Unix default and notepad the Windows one). |
@@ -150,7 +153,7 b' All options with a [no] prepended can be specified in negated form' | |||
|
150 | 153 | small, lightweight editor here (in case your default EDITOR is |
|
151 | 154 | something like Emacs). |
|
152 | 155 | |
|
153 |
|
|
|
156 | ipython_dir=<name> | |
|
154 | 157 | name of your IPython configuration directory IPYTHON_DIR. This |
|
155 | 158 | can also be specified through the environment variable |
|
156 | 159 | IPYTHON_DIR. |
@@ -187,28 +190,28 b' All options with a [no] prepended can be specified in negated form' | |||
|
187 | 190 | our first attempts failed because of inherent limitations of |
|
188 | 191 | Python's Pickle module, so this may have to wait. |
|
189 | 192 | |
|
190 | -[no]messages | |
|
193 | --[no-]messages | |
|
191 | 194 | Print messages which IPython collects about its startup |
|
192 | 195 | process (default on). |
|
193 | 196 | |
|
194 | -[no]pdb | |
|
197 | --[no-]pdb | |
|
195 | 198 | Automatically call the pdb debugger after every uncaught |
|
196 | 199 | exception. If you are used to debugging using pdb, this puts |
|
197 | 200 | you automatically inside of it after any call (either in |
|
198 | 201 | IPython or in code called by it) which triggers an exception |
|
199 | 202 | which goes uncaught. |
|
200 | 203 | |
|
201 | -pydb | |
|
204 | --pydb | |
|
202 | 205 | Makes IPython use the third party "pydb" package as debugger, |
|
203 | 206 | instead of pdb. Requires that pydb is installed. |
|
204 | 207 | |
|
205 | -[no]pprint | |
|
208 | --[no-]pprint | |
|
206 | 209 | ipython can optionally use the pprint (pretty printer) module |
|
207 | 210 | for displaying results. pprint tends to give a nicer display |
|
208 | 211 | of nested data structures. If you like it, you can turn it on |
|
209 | 212 | permanently in your config file (default off). |
|
210 | 213 | |
|
211 |
|
|
|
214 | profile=<name> | |
|
212 | 215 | |
|
213 | 216 | assume that your config file is ipythonrc-<name> or |
|
214 | 217 | ipy_profile_<name>.py (looks in current dir first, then in |
@@ -227,7 +230,7 b' All options with a [no] prepended can be specified in negated form' | |||
|
227 | 230 | circular file inclusions, IPython will stop if it reaches 15 |
|
228 | 231 | recursive inclusions. |
|
229 | 232 | |
|
230 |
|
|
|
233 | pi1=<string> | |
|
231 | 234 | |
|
232 | 235 | Specify the string used for input prompts. Note that if you are using |
|
233 | 236 | numbered prompts, the number is represented with a '\#' in the |
@@ -236,7 +239,7 b' All options with a [no] prepended can be specified in negated form' | |||
|
236 | 239 | discusses in detail all the available escapes to customize your |
|
237 | 240 | prompts. |
|
238 | 241 | |
|
239 |
|
|
|
242 | pi2=<string> | |
|
240 | 243 | Similar to the previous option, but used for the continuation |
|
241 | 244 | prompts. The special sequence '\D' is similar to '\#', but |
|
242 | 245 | with all digits replaced dots (so you can have your |
@@ -244,21 +247,22 b' All options with a [no] prepended can be specified in negated form' | |||
|
244 | 247 | ' .\D.:' (note three spaces at the start for alignment with |
|
245 | 248 | 'In [\#]'). |
|
246 | 249 | |
|
247 |
|
|
|
250 | po=<string> | |
|
248 | 251 | String used for output prompts, also uses numbers like |
|
249 | 252 | prompt_in1. Default: 'Out[\#]:' |
|
250 | 253 | |
|
251 | -quick start in bare bones mode (no config file loaded). | |
|
254 | --quick | |
|
255 | start in bare bones mode (no config file loaded). | |
|
252 | 256 | |
|
253 |
|
|
|
257 | config_file=<name> | |
|
254 | 258 | name of your IPython resource configuration file. Normally |
|
255 |
IPython loads ipython |
|
|
256 |
IPYTHON_DIR/ |
|
|
259 | IPython loads ipython_config.py (from current directory) or | |
|
260 | IPYTHON_DIR/profile_default. | |
|
257 | 261 | |
|
258 | 262 | If the loading of your config file fails, IPython starts with |
|
259 | 263 | a bare bones configuration (no modules loaded at all). |
|
260 | 264 | |
|
261 | -[no]readline | |
|
265 | --[no-]readline | |
|
262 | 266 | use the readline library, which is needed to support name |
|
263 | 267 | completion and command history, among other things. It is |
|
264 | 268 | enabled by default, but may cause problems for users of |
@@ -268,7 +272,7 b' All options with a [no] prepended can be specified in negated form' | |||
|
268 | 272 | IPython's readline and syntax coloring fine, only 'emacs' (M-x |
|
269 | 273 | shell and C-c !) buffers do not. |
|
270 | 274 | |
|
271 | -screen_length, sl <n> | |
|
275 | sl=<n> | |
|
272 | 276 | number of lines of your screen. This is used to control |
|
273 | 277 | printing of very long strings. Strings longer than this number |
|
274 | 278 | of lines will be sent through a pager instead of directly |
@@ -281,41 +285,38 b' All options with a [no] prepended can be specified in negated form' | |||
|
281 | 285 | reason this isn't working well (it needs curses support), specify |
|
282 | 286 | it yourself. Otherwise don't change the default. |
|
283 | 287 | |
|
284 |
|
|
|
288 | si=<string> | |
|
285 | 289 | |
|
286 | 290 | separator before input prompts. |
|
287 | 291 | Default: '\n' |
|
288 | 292 | |
|
289 |
|
|
|
293 | so=<string> | |
|
290 | 294 | separator before output prompts. |
|
291 | 295 | Default: nothing. |
|
292 | 296 | |
|
293 | -separate_out2, so2 | |
|
297 | so2=<string> | |
|
294 | 298 | separator after output prompts. |
|
295 | 299 | Default: nothing. |
|
296 | 300 | For these three options, use the value 0 to specify no separator. |
|
297 | 301 | |
|
298 |
-nosep |
|
|
302 | --nosep | |
|
299 | 303 | shorthand for '-SeparateIn 0 -SeparateOut 0 -SeparateOut2 |
|
300 | 304 | 0'. Simply removes all input/output separators. |
|
301 | 305 | |
|
302 | -upgrade | |
|
303 |
allows you to |
|
|
306 | --init | |
|
307 | allows you to initialize your IPYTHON_DIR configuration when you | |
|
304 | 308 | install a new version of IPython. Since new versions may |
|
305 | 309 | include new command line options or example files, this copies |
|
306 |
updated |
|
|
310 | updated config files. However, it backs up (with a | |
|
307 | 311 | .old extension) all files which it overwrites so that you can |
|
308 | 312 | merge back any customizations you might have in your personal |
|
309 | 313 | files. Note that you should probably use %upgrade instead, |
|
310 | 314 | it's a safer alternative. |
|
311 | 315 | |
|
312 | 316 | |
|
313 |
- |
|
|
314 | ||
|
315 | -wxversion <string> | |
|
316 | Deprecated. | |
|
317 | --version print version information and exit. | |
|
317 | 318 | |
|
318 |
|
|
|
319 | xmode=<modename> | |
|
319 | 320 | |
|
320 | 321 | Mode for exception reporting. |
|
321 | 322 |
@@ -324,7 +324,7 b' made a profile for my project (which is called "parkfield")::' | |||
|
324 | 324 | |
|
325 | 325 | I also added a shell alias for convenience:: |
|
326 | 326 | |
|
327 |
alias parkfield="ipython -pylab |
|
|
327 | alias parkfield="ipython --pylab profile=parkfield" | |
|
328 | 328 | |
|
329 | 329 | Now I have a nice little directory with everything I ever type in, |
|
330 | 330 | organized by project and date. |
General Comments 0
You need to be logged in to leave comments.
Login now