Show More
@@ -297,6 +297,8 b' NoConfigDefault = __NoConfigDefault()' | |||||
297 |
|
297 | |||
298 |
|
298 | |||
299 | class ArgParseConfigLoader(CommandLineConfigLoader): |
|
299 | class ArgParseConfigLoader(CommandLineConfigLoader): | |
|
300 | #: Global default for arguments (see argparse docs for details) | |||
|
301 | argument_default = NoConfigDefault | |||
300 |
|
302 | |||
301 | def __init__(self, argv=None, arguments=(), *args, **kw): |
|
303 | def __init__(self, argv=None, arguments=(), *args, **kw): | |
302 | """Create a config loader for use with argparse. |
|
304 | """Create a config loader for use with argparse. | |
@@ -322,7 +324,9 b' class ArgParseConfigLoader(CommandLineConfigLoader):' | |||||
322 | self.argv = argv |
|
324 | self.argv = argv | |
323 | self.arguments = arguments |
|
325 | self.arguments = arguments | |
324 | self.args = args |
|
326 | self.args = args | |
325 | self.kw = kw |
|
327 | kwargs = dict(argument_default=self.argument_default) | |
|
328 | kwargs.update(kw) | |||
|
329 | self.kw = kwargs | |||
326 |
|
330 | |||
327 | def load_config(self, args=None): |
|
331 | def load_config(self, args=None): | |
328 | """Parse command line arguments and return as a Struct. |
|
332 | """Parse command line arguments and return as a Struct. | |
@@ -353,14 +357,13 b' class ArgParseConfigLoader(CommandLineConfigLoader):' | |||||
353 | self._add_arguments() |
|
357 | self._add_arguments() | |
354 | self._add_other_arguments() |
|
358 | self._add_other_arguments() | |
355 |
|
359 | |||
356 | def _add_other_arguments(self): |
|
|||
357 | pass |
|
|||
358 |
|
||||
359 | def _add_arguments(self): |
|
360 | def _add_arguments(self): | |
360 | for argument in self.arguments: |
|
361 | for argument in self.arguments: | |
361 | argument[1].setdefault('default', NoConfigDefault) |
|
|||
362 | self.parser.add_argument(*argument[0],**argument[1]) |
|
362 | self.parser.add_argument(*argument[0],**argument[1]) | |
363 |
|
363 | |||
|
364 | def _add_other_arguments(self): | |||
|
365 | pass | |||
|
366 | ||||
364 | def _parse_args(self, args): |
|
367 | def _parse_args(self, args): | |
365 | """self.parser->self.parsed_data""" |
|
368 | """self.parser->self.parsed_data""" | |
366 | self.parsed_data, self.extra_args = self.parser.parse_known_args(args) |
|
369 | self.parsed_data, self.extra_args = self.parser.parse_known_args(args) |
@@ -39,7 +39,6 b' from IPython.config.loader import (' | |||||
39 | PyFileConfigLoader, |
|
39 | PyFileConfigLoader, | |
40 | ArgParseConfigLoader, |
|
40 | ArgParseConfigLoader, | |
41 | Config, |
|
41 | Config, | |
42 | NoConfigDefault |
|
|||
43 | ) |
|
42 | ) | |
44 |
|
43 | |||
45 | #----------------------------------------------------------------------------- |
|
44 | #----------------------------------------------------------------------------- | |
@@ -57,7 +56,6 b' app_cl_args = (' | |||||
57 | """Set to override default location of the IPython directory |
|
56 | """Set to override default location of the IPython directory | |
58 | IPYTHON_DIR, stored as Global.ipython_dir. This can also be specified |
|
57 | IPYTHON_DIR, stored as Global.ipython_dir. This can also be specified | |
59 | through the environment variable IPYTHON_DIR.""", |
|
58 | through the environment variable IPYTHON_DIR.""", | |
60 | default=NoConfigDefault, |
|
|||
61 | metavar='Global.ipython_dir') ), |
|
59 | metavar='Global.ipython_dir') ), | |
62 | (('-p', '--profile',), dict( |
|
60 | (('-p', '--profile',), dict( | |
63 | dest='Global.profile',type=unicode, |
|
61 | dest='Global.profile',type=unicode, | |
@@ -69,12 +67,10 b' app_cl_args = (' | |||||
69 | in your more specialized ones. You can keep a basic |
|
67 | in your more specialized ones. You can keep a basic | |
70 | IPYTHON_DIR/ipython_config.py file and then have other 'profiles' which |
|
68 | IPYTHON_DIR/ipython_config.py file and then have other 'profiles' which | |
71 | include this one and load extra things for particular tasks.""", |
|
69 | include this one and load extra things for particular tasks.""", | |
72 | default=NoConfigDefault, |
|
|||
73 | metavar='Global.profile') ), |
|
70 | metavar='Global.profile') ), | |
74 | (('--log-level',), dict( |
|
71 | (('--log-level',), dict( | |
75 | dest="Global.log_level",type=int, |
|
72 | dest="Global.log_level",type=int, | |
76 | help='Set the log level (0,10,20,30,40,50). Default is 30.', |
|
73 | help='Set the log level (0,10,20,30,40,50). Default is 30.', | |
77 | default=NoConfigDefault, |
|
|||
78 | metavar='Global.log_level')), |
|
74 | metavar='Global.log_level')), | |
79 | (('--config-file',), dict( |
|
75 | (('--config-file',), dict( | |
80 | dest='Global.config_file',type=unicode, |
|
76 | dest='Global.config_file',type=unicode, | |
@@ -84,7 +80,6 b' app_cl_args = (' | |||||
84 | IPYTHON_DIR/ipython_config.py. If the loading of your config file |
|
80 | IPYTHON_DIR/ipython_config.py. If the loading of your config file | |
85 | fails, IPython starts with a bare bones configuration (no modules |
|
81 | fails, IPython starts with a bare bones configuration (no modules | |
86 | loaded at all).""", |
|
82 | loaded at all).""", | |
87 | default=NoConfigDefault, |
|
|||
88 | metavar='Global.config_file')), |
|
83 | metavar='Global.config_file')), | |
89 | ) |
|
84 | ) | |
90 |
|
85 |
@@ -28,15 +28,12 b' import os' | |||||
28 | import sys |
|
28 | import sys | |
29 |
|
29 | |||
30 | from IPython.core import crashhandler |
|
30 | from IPython.core import crashhandler | |
31 | from IPython.core import release |
|
|||
32 | from IPython.core.application import Application |
|
31 | from IPython.core.application import Application | |
33 | from IPython.core.error import UsageError |
|
|||
34 | from IPython.core.iplib import InteractiveShell |
|
32 | from IPython.core.iplib import InteractiveShell | |
35 | from IPython.core.pylabtools import pylab_activate |
|
|||
36 | from IPython.config.loader import ( |
|
33 | from IPython.config.loader import ( | |
37 | NoConfigDefault, |
|
|||
38 | Config, |
|
34 | Config, | |
39 | PyFileConfigLoader |
|
35 | PyFileConfigLoader, | |
|
36 | # NoConfigDefault, | |||
40 | ) |
|
37 | ) | |
41 | from IPython.lib import inputhook |
|
38 | from IPython.lib import inputhook | |
42 | from IPython.utils.genutils import filefind, get_ipython_dir |
|
39 | from IPython.utils.genutils import filefind, get_ipython_dir | |
@@ -50,7 +47,7 b" default_config_file_name = u'ipython_config.py'" | |||||
50 |
|
47 | |||
51 | cl_args = ( |
|
48 | cl_args = ( | |
52 | (('--autocall',), dict( |
|
49 | (('--autocall',), dict( | |
53 |
type=int, dest='InteractiveShell.autocall', |
|
50 | type=int, dest='InteractiveShell.autocall', | |
54 | help= |
|
51 | help= | |
55 | """Make IPython automatically call any callable object even if you |
|
52 | """Make IPython automatically call any callable object even if you | |
56 | didn't type explicit parentheses. For example, 'str 43' becomes |
|
53 | didn't type explicit parentheses. For example, 'str 43' becomes | |
@@ -63,47 +60,39 b' cl_args = (' | |||||
63 | ), |
|
60 | ), | |
64 | (('--autoindent',), dict( |
|
61 | (('--autoindent',), dict( | |
65 | action='store_true', dest='InteractiveShell.autoindent', |
|
62 | action='store_true', dest='InteractiveShell.autoindent', | |
66 | default=NoConfigDefault, |
|
|||
67 | help='Turn on autoindenting.') |
|
63 | help='Turn on autoindenting.') | |
68 | ), |
|
64 | ), | |
69 | (('--no-autoindent',), dict( |
|
65 | (('--no-autoindent',), dict( | |
70 | action='store_false', dest='InteractiveShell.autoindent', |
|
66 | action='store_false', dest='InteractiveShell.autoindent', | |
71 | default=NoConfigDefault, |
|
|||
72 | help='Turn off autoindenting.') |
|
67 | help='Turn off autoindenting.') | |
73 | ), |
|
68 | ), | |
74 | (('--automagic',), dict( |
|
69 | (('--automagic',), dict( | |
75 | action='store_true', dest='InteractiveShell.automagic', |
|
70 | action='store_true', dest='InteractiveShell.automagic', | |
76 | default=NoConfigDefault, |
|
|||
77 | help='Turn on the auto calling of magic commands.' |
|
71 | help='Turn on the auto calling of magic commands.' | |
78 | 'Type %%magic at the IPython prompt for more information.') |
|
72 | 'Type %%magic at the IPython prompt for more information.') | |
79 | ), |
|
73 | ), | |
80 | (('--no-automagic',), dict( |
|
74 | (('--no-automagic',), dict( | |
81 | action='store_false', dest='InteractiveShell.automagic', |
|
75 | action='store_false', dest='InteractiveShell.automagic', | |
82 | default=NoConfigDefault, |
|
|||
83 | help='Turn off the auto calling of magic commands.') |
|
76 | help='Turn off the auto calling of magic commands.') | |
84 | ), |
|
77 | ), | |
85 | (('--autoedit-syntax',), dict( |
|
78 | (('--autoedit-syntax',), dict( | |
86 | action='store_true', dest='InteractiveShell.autoedit_syntax', |
|
79 | action='store_true', dest='InteractiveShell.autoedit_syntax', | |
87 | default=NoConfigDefault, |
|
|||
88 | help='Turn on auto editing of files with syntax errors.') |
|
80 | help='Turn on auto editing of files with syntax errors.') | |
89 | ), |
|
81 | ), | |
90 | (('--no-autoedit-syntax',), dict( |
|
82 | (('--no-autoedit-syntax',), dict( | |
91 | action='store_false', dest='InteractiveShell.autoedit_syntax', |
|
83 | action='store_false', dest='InteractiveShell.autoedit_syntax', | |
92 | default=NoConfigDefault, |
|
|||
93 | help='Turn off auto editing of files with syntax errors.') |
|
84 | help='Turn off auto editing of files with syntax errors.') | |
94 | ), |
|
85 | ), | |
95 | (('--banner',), dict( |
|
86 | (('--banner',), dict( | |
96 | action='store_true', dest='Global.display_banner', |
|
87 | action='store_true', dest='Global.display_banner', | |
97 | default=NoConfigDefault, |
|
|||
98 | help='Display a banner upon starting IPython.') |
|
88 | help='Display a banner upon starting IPython.') | |
99 | ), |
|
89 | ), | |
100 | (('--no-banner',), dict( |
|
90 | (('--no-banner',), dict( | |
101 | action='store_false', dest='Global.display_banner', |
|
91 | action='store_false', dest='Global.display_banner', | |
102 | default=NoConfigDefault, |
|
|||
103 | help="Don't display a banner upon starting IPython.") |
|
92 | help="Don't display a banner upon starting IPython.") | |
104 | ), |
|
93 | ), | |
105 | (('--cache-size',), dict( |
|
94 | (('--cache-size',), dict( | |
106 |
type=int, dest='InteractiveShell.cache_size', |
|
95 | type=int, dest='InteractiveShell.cache_size', | |
107 | help= |
|
96 | help= | |
108 | """Set the size of the output cache. The default is 1000, you can |
|
97 | """Set the size of the output cache. The default is 1000, you can | |
109 | change it permanently in your config file. Setting it to 0 completely |
|
98 | change it permanently in your config file. Setting it to 0 completely | |
@@ -115,17 +104,16 b' cl_args = (' | |||||
115 | metavar='InteractiveShell.cache_size') |
|
104 | metavar='InteractiveShell.cache_size') | |
116 | ), |
|
105 | ), | |
117 | (('--classic',), dict( |
|
106 | (('--classic',), dict( | |
118 |
action='store_true', dest='Global.classic', |
|
107 | action='store_true', dest='Global.classic', | |
119 | help="Gives IPython a similar feel to the classic Python prompt.") |
|
108 | help="Gives IPython a similar feel to the classic Python prompt.") | |
120 | ), |
|
109 | ), | |
121 | (('--colors',), dict( |
|
110 | (('--colors',), dict( | |
122 |
type=str, dest='InteractiveShell.colors', |
|
111 | type=str, dest='InteractiveShell.colors', | |
123 | help="Set the color scheme (NoColor, Linux, and LightBG).", |
|
112 | help="Set the color scheme (NoColor, Linux, and LightBG).", | |
124 | metavar='InteractiveShell.colors') |
|
113 | metavar='InteractiveShell.colors') | |
125 | ), |
|
114 | ), | |
126 | (('--color-info',), dict( |
|
115 | (('--color-info',), dict( | |
127 | action='store_true', dest='InteractiveShell.color_info', |
|
116 | action='store_true', dest='InteractiveShell.color_info', | |
128 | default=NoConfigDefault, |
|
|||
129 | help= |
|
117 | help= | |
130 | """IPython can display information about objects via a set of func- |
|
118 | """IPython can display information about objects via a set of func- | |
131 | tions, and optionally can use colors for this, syntax highlighting |
|
119 | tions, and optionally can use colors for this, syntax highlighting | |
@@ -140,12 +128,10 b' cl_args = (' | |||||
140 | ), |
|
128 | ), | |
141 | (('--no-color-info',), dict( |
|
129 | (('--no-color-info',), dict( | |
142 | action='store_false', dest='InteractiveShell.color_info', |
|
130 | action='store_false', dest='InteractiveShell.color_info', | |
143 | default=NoConfigDefault, |
|
|||
144 | help="Disable using colors for info related things.") |
|
131 | help="Disable using colors for info related things.") | |
145 | ), |
|
132 | ), | |
146 | (('--confirm-exit',), dict( |
|
133 | (('--confirm-exit',), dict( | |
147 | action='store_true', dest='InteractiveShell.confirm_exit', |
|
134 | action='store_true', dest='InteractiveShell.confirm_exit', | |
148 | default=NoConfigDefault, |
|
|||
149 | help= |
|
135 | help= | |
150 | """Set to confirm when you try to exit IPython with an EOF (Control-D |
|
136 | """Set to confirm when you try to exit IPython with an EOF (Control-D | |
151 | in Unix, Control-Z/Enter in Windows). By typing 'exit', 'quit' or |
|
137 | in Unix, Control-Z/Enter in Windows). By typing 'exit', 'quit' or | |
@@ -155,12 +141,10 b' cl_args = (' | |||||
155 | ), |
|
141 | ), | |
156 | (('--no-confirm-exit',), dict( |
|
142 | (('--no-confirm-exit',), dict( | |
157 | action='store_false', dest='InteractiveShell.confirm_exit', |
|
143 | action='store_false', dest='InteractiveShell.confirm_exit', | |
158 | default=NoConfigDefault, |
|
|||
159 | help="Don't prompt the user when exiting.") |
|
144 | help="Don't prompt the user when exiting.") | |
160 | ), |
|
145 | ), | |
161 | (('--deep-reload',), dict( |
|
146 | (('--deep-reload',), dict( | |
162 | action='store_true', dest='InteractiveShell.deep_reload', |
|
147 | action='store_true', dest='InteractiveShell.deep_reload', | |
163 | default=NoConfigDefault, |
|
|||
164 | help= |
|
148 | help= | |
165 | """Enable deep (recursive) reloading by default. IPython can use the |
|
149 | """Enable deep (recursive) reloading by default. IPython can use the | |
166 | deep_reload module which reloads changes in modules recursively (it |
|
150 | deep_reload module which reloads changes in modules recursively (it | |
@@ -174,52 +158,45 b' cl_args = (' | |||||
174 | ), |
|
158 | ), | |
175 | (('--no-deep-reload',), dict( |
|
159 | (('--no-deep-reload',), dict( | |
176 | action='store_false', dest='InteractiveShell.deep_reload', |
|
160 | action='store_false', dest='InteractiveShell.deep_reload', | |
177 | default=NoConfigDefault, |
|
|||
178 | help="Disable deep (recursive) reloading by default.") |
|
161 | help="Disable deep (recursive) reloading by default.") | |
179 | ), |
|
162 | ), | |
180 | (('--editor',), dict( |
|
163 | (('--editor',), dict( | |
181 |
type=str, dest='InteractiveShell.editor', |
|
164 | type=str, dest='InteractiveShell.editor', | |
182 | help="Set the editor used by IPython (default to $EDITOR/vi/notepad).", |
|
165 | help="Set the editor used by IPython (default to $EDITOR/vi/notepad).", | |
183 | metavar='InteractiveShell.editor') |
|
166 | metavar='InteractiveShell.editor') | |
184 | ), |
|
167 | ), | |
185 | (('--log','-l'), dict( |
|
168 | (('--log','-l'), dict( | |
186 | action='store_true', dest='InteractiveShell.logstart', |
|
169 | action='store_true', dest='InteractiveShell.logstart', | |
187 | default=NoConfigDefault, |
|
|||
188 | help="Start logging to the default log file (./ipython_log.py).") |
|
170 | help="Start logging to the default log file (./ipython_log.py).") | |
189 | ), |
|
171 | ), | |
190 | (('--logfile','-lf'), dict( |
|
172 | (('--logfile','-lf'), dict( | |
191 |
type=unicode, dest='InteractiveShell.logfile', |
|
173 | type=unicode, dest='InteractiveShell.logfile', | |
192 | help="Start logging to logfile with this name.", |
|
174 | help="Start logging to logfile with this name.", | |
193 | metavar='InteractiveShell.logfile') |
|
175 | metavar='InteractiveShell.logfile') | |
194 | ), |
|
176 | ), | |
195 | (('--log-append','-la'), dict( |
|
177 | (('--log-append','-la'), dict( | |
196 | type=unicode, dest='InteractiveShell.logappend', |
|
178 | type=unicode, dest='InteractiveShell.logappend', | |
197 | default=NoConfigDefault, |
|
|||
198 | help="Start logging to the given file in append mode.", |
|
179 | help="Start logging to the given file in append mode.", | |
199 | metavar='InteractiveShell.logfile') |
|
180 | metavar='InteractiveShell.logfile') | |
200 | ), |
|
181 | ), | |
201 | (('--pdb',), dict( |
|
182 | (('--pdb',), dict( | |
202 | action='store_true', dest='InteractiveShell.pdb', |
|
183 | action='store_true', dest='InteractiveShell.pdb', | |
203 | default=NoConfigDefault, |
|
|||
204 | help="Enable auto calling the pdb debugger after every exception.") |
|
184 | help="Enable auto calling the pdb debugger after every exception.") | |
205 | ), |
|
185 | ), | |
206 | (('--no-pdb',), dict( |
|
186 | (('--no-pdb',), dict( | |
207 | action='store_false', dest='InteractiveShell.pdb', |
|
187 | action='store_false', dest='InteractiveShell.pdb', | |
208 | default=NoConfigDefault, |
|
|||
209 | help="Disable auto calling the pdb debugger after every exception.") |
|
188 | help="Disable auto calling the pdb debugger after every exception.") | |
210 | ), |
|
189 | ), | |
211 | (('--pprint',), dict( |
|
190 | (('--pprint',), dict( | |
212 | action='store_true', dest='InteractiveShell.pprint', |
|
191 | action='store_true', dest='InteractiveShell.pprint', | |
213 | default=NoConfigDefault, |
|
|||
214 | help="Enable auto pretty printing of results.") |
|
192 | help="Enable auto pretty printing of results.") | |
215 | ), |
|
193 | ), | |
216 | (('--no-pprint',), dict( |
|
194 | (('--no-pprint',), dict( | |
217 | action='store_false', dest='InteractiveShell.pprint', |
|
195 | action='store_false', dest='InteractiveShell.pprint', | |
218 | default=NoConfigDefault, |
|
|||
219 | help="Disable auto auto pretty printing of results.") |
|
196 | help="Disable auto auto pretty printing of results.") | |
220 | ), |
|
197 | ), | |
221 | (('--prompt-in1','-pi1'), dict( |
|
198 | (('--prompt-in1','-pi1'), dict( | |
222 |
type=str, dest='InteractiveShell.prompt_in1', |
|
199 | type=str, dest='InteractiveShell.prompt_in1', | |
223 | help= |
|
200 | help= | |
224 | """Set the main input prompt ('In [\#]: '). Note that if you are using |
|
201 | """Set the main input prompt ('In [\#]: '). Note that if you are using | |
225 | numbered prompts, the number is represented with a '\#' in the string. |
|
202 | numbered prompts, the number is represented with a '\#' in the string. | |
@@ -231,7 +208,7 b' cl_args = (' | |||||
231 | metavar='InteractiveShell.prompt_in1') |
|
208 | metavar='InteractiveShell.prompt_in1') | |
232 | ), |
|
209 | ), | |
233 | (('--prompt-in2','-pi2'), dict( |
|
210 | (('--prompt-in2','-pi2'), dict( | |
234 |
type=str, dest='InteractiveShell.prompt_in2', |
|
211 | type=str, dest='InteractiveShell.prompt_in2', | |
235 | help= |
|
212 | help= | |
236 | """Set the secondary input prompt (' .\D.: '). Similar to the previous |
|
213 | """Set the secondary input prompt (' .\D.: '). Similar to the previous | |
237 | option, but used for the continuation prompts. The special sequence |
|
214 | option, but used for the continuation prompts. The special sequence | |
@@ -242,27 +219,24 b' cl_args = (' | |||||
242 | metavar='InteractiveShell.prompt_in2') |
|
219 | metavar='InteractiveShell.prompt_in2') | |
243 | ), |
|
220 | ), | |
244 | (('--prompt-out','-po'), dict( |
|
221 | (('--prompt-out','-po'), dict( | |
245 |
type=str, dest='InteractiveShell.prompt_out', |
|
222 | type=str, dest='InteractiveShell.prompt_out', | |
246 | help="Set the output prompt ('Out[\#]:')", |
|
223 | help="Set the output prompt ('Out[\#]:')", | |
247 | metavar='InteractiveShell.prompt_out') |
|
224 | metavar='InteractiveShell.prompt_out') | |
248 | ), |
|
225 | ), | |
249 | (('--quick',), dict( |
|
226 | (('--quick',), dict( | |
250 |
action='store_true', dest='Global.quick', |
|
227 | action='store_true', dest='Global.quick', | |
251 | help="Enable quick startup with no config files.") |
|
228 | help="Enable quick startup with no config files.") | |
252 | ), |
|
229 | ), | |
253 | (('--readline',), dict( |
|
230 | (('--readline',), dict( | |
254 | action='store_true', dest='InteractiveShell.readline_use', |
|
231 | action='store_true', dest='InteractiveShell.readline_use', | |
255 | default=NoConfigDefault, |
|
|||
256 | help="Enable readline for command line usage.") |
|
232 | help="Enable readline for command line usage.") | |
257 | ), |
|
233 | ), | |
258 | (('--no-readline',), dict( |
|
234 | (('--no-readline',), dict( | |
259 | action='store_false', dest='InteractiveShell.readline_use', |
|
235 | action='store_false', dest='InteractiveShell.readline_use', | |
260 | default=NoConfigDefault, |
|
|||
261 | help="Disable readline for command line usage.") |
|
236 | help="Disable readline for command line usage.") | |
262 | ), |
|
237 | ), | |
263 | (('--screen-length','-sl'), dict( |
|
238 | (('--screen-length','-sl'), dict( | |
264 | type=int, dest='InteractiveShell.screen_length', |
|
239 | type=int, dest='InteractiveShell.screen_length', | |
265 | default=NoConfigDefault, |
|
|||
266 | help= |
|
240 | help= | |
267 | """Number of lines of your screen, used to control printing of very |
|
241 | """Number of lines of your screen, used to control printing of very | |
268 | long strings. Strings longer than this number of lines will be sent |
|
242 | long strings. Strings longer than this number of lines will be sent | |
@@ -276,38 +250,34 b' cl_args = (' | |||||
276 | metavar='InteractiveShell.screen_length') |
|
250 | metavar='InteractiveShell.screen_length') | |
277 | ), |
|
251 | ), | |
278 | (('--separate-in','-si'), dict( |
|
252 | (('--separate-in','-si'), dict( | |
279 |
type=str, dest='InteractiveShell.separate_in', |
|
253 | type=str, dest='InteractiveShell.separate_in', | |
280 | help="Separator before input prompts. Default '\\n'.", |
|
254 | help="Separator before input prompts. Default '\\n'.", | |
281 | metavar='InteractiveShell.separate_in') |
|
255 | metavar='InteractiveShell.separate_in') | |
282 | ), |
|
256 | ), | |
283 | (('--separate-out','-so'), dict( |
|
257 | (('--separate-out','-so'), dict( | |
284 | type=str, dest='InteractiveShell.separate_out', |
|
258 | type=str, dest='InteractiveShell.separate_out', | |
285 | default=NoConfigDefault, |
|
|||
286 | help="Separator before output prompts. Default 0 (nothing).", |
|
259 | help="Separator before output prompts. Default 0 (nothing).", | |
287 | metavar='InteractiveShell.separate_out') |
|
260 | metavar='InteractiveShell.separate_out') | |
288 | ), |
|
261 | ), | |
289 | (('--separate-out2','-so2'), dict( |
|
262 | (('--separate-out2','-so2'), dict( | |
290 | type=str, dest='InteractiveShell.separate_out2', |
|
263 | type=str, dest='InteractiveShell.separate_out2', | |
291 | default=NoConfigDefault, |
|
|||
292 | help="Separator after output prompts. Default 0 (nonight).", |
|
264 | help="Separator after output prompts. Default 0 (nonight).", | |
293 | metavar='InteractiveShell.separate_out2') |
|
265 | metavar='InteractiveShell.separate_out2') | |
294 | ), |
|
266 | ), | |
295 | (('-no-sep',), dict( |
|
267 | (('-no-sep',), dict( | |
296 |
action='store_true', dest='Global.nosep', |
|
268 | action='store_true', dest='Global.nosep', | |
297 | help="Eliminate all spacing between prompts.") |
|
269 | help="Eliminate all spacing between prompts.") | |
298 | ), |
|
270 | ), | |
299 | (('--term-title',), dict( |
|
271 | (('--term-title',), dict( | |
300 | action='store_true', dest='InteractiveShell.term_title', |
|
272 | action='store_true', dest='InteractiveShell.term_title', | |
301 | default=NoConfigDefault, |
|
|||
302 | help="Enable auto setting the terminal title.") |
|
273 | help="Enable auto setting the terminal title.") | |
303 | ), |
|
274 | ), | |
304 | (('--no-term-title',), dict( |
|
275 | (('--no-term-title',), dict( | |
305 | action='store_false', dest='InteractiveShell.term_title', |
|
276 | action='store_false', dest='InteractiveShell.term_title', | |
306 | default=NoConfigDefault, |
|
|||
307 | help="Disable auto setting the terminal title.") |
|
277 | help="Disable auto setting the terminal title.") | |
308 | ), |
|
278 | ), | |
309 | (('--xmode',), dict( |
|
279 | (('--xmode',), dict( | |
310 |
type=str, dest='InteractiveShell.xmode', |
|
280 | type=str, dest='InteractiveShell.xmode', | |
311 | help= |
|
281 | help= | |
312 | """Exception reporting mode ('Plain','Context','Verbose'). Plain: |
|
282 | """Exception reporting mode ('Plain','Context','Verbose'). Plain: | |
313 | similar to python's normal traceback printing. Context: prints 5 lines |
|
283 | similar to python's normal traceback printing. Context: prints 5 lines | |
@@ -323,18 +293,17 b' cl_args = (' | |||||
323 | metavar='InteractiveShell.xmode') |
|
293 | metavar='InteractiveShell.xmode') | |
324 | ), |
|
294 | ), | |
325 | (('--ext',), dict( |
|
295 | (('--ext',), dict( | |
326 |
type=str, dest='Global.extra_extension', |
|
296 | type=str, dest='Global.extra_extension', | |
327 | help="The dotted module name of an IPython extension to load.", |
|
297 | help="The dotted module name of an IPython extension to load.", | |
328 | metavar='Global.extra_extension') |
|
298 | metavar='Global.extra_extension') | |
329 | ), |
|
299 | ), | |
330 | (('-c',), dict( |
|
300 | (('-c',), dict( | |
331 |
type=str, dest='Global.code_to_run', |
|
301 | type=str, dest='Global.code_to_run', | |
332 | help="Execute the given command string.", |
|
302 | help="Execute the given command string.", | |
333 | metavar='Global.code_to_run') |
|
303 | metavar='Global.code_to_run') | |
334 | ), |
|
304 | ), | |
335 | (('-i',), dict( |
|
305 | (('-i',), dict( | |
336 | action='store_true', dest='Global.force_interact', |
|
306 | action='store_true', dest='Global.force_interact', | |
337 | default=NoConfigDefault, |
|
|||
338 | help= |
|
307 | help= | |
339 | "If running code from the command line, become interactive afterwards." |
|
308 | "If running code from the command line, become interactive afterwards." | |
340 | ) |
|
309 | ) | |
@@ -342,13 +311,13 b' cl_args = (' | |||||
342 |
|
311 | |||
343 | # Options to start with GUI control enabled from the beginning |
|
312 | # Options to start with GUI control enabled from the beginning | |
344 | (('--gui',), dict( |
|
313 | (('--gui',), dict( | |
345 |
type=str, dest='Global.gui', |
|
314 | type=str, dest='Global.gui', | |
346 | help="Enable GUI event loop integration ('qt', 'wx', 'gtk').", |
|
315 | help="Enable GUI event loop integration ('qt', 'wx', 'gtk').", | |
347 | metavar='gui-mode') |
|
316 | metavar='gui-mode') | |
348 | ), |
|
317 | ), | |
349 |
|
318 | |||
350 | (('--pylab','-pylab'), dict( |
|
319 | (('--pylab','-pylab'), dict( | |
351 |
type=str, dest='Global.pylab', |
|
320 | type=str, dest='Global.pylab', | |
352 | nargs='?', const='auto', metavar='gui-mode', |
|
321 | nargs='?', const='auto', metavar='gui-mode', | |
353 | help="Pre-load matplotlib and numpy for interactive use. "+ |
|
322 | help="Pre-load matplotlib and numpy for interactive use. "+ | |
354 | "If no value is given, the gui backend is matplotlib's, else use "+ |
|
323 | "If no value is given, the gui backend is matplotlib's, else use "+ | |
@@ -358,17 +327,17 b' cl_args = (' | |||||
358 | # Legacy GUI options. Leave them in for backwards compatibility, but the |
|
327 | # Legacy GUI options. Leave them in for backwards compatibility, but the | |
359 | # 'thread' names are really a misnomer now. |
|
328 | # 'thread' names are really a misnomer now. | |
360 | (('--wthread','-wthread'), dict( |
|
329 | (('--wthread','-wthread'), dict( | |
361 |
action='store_true', dest='Global.wthread', |
|
330 | action='store_true', dest='Global.wthread', | |
362 | help="Enable wxPython event loop integration "+ |
|
331 | help="Enable wxPython event loop integration "+ | |
363 | "(DEPRECATED, use --gui wx)") |
|
332 | "(DEPRECATED, use --gui wx)") | |
364 | ), |
|
333 | ), | |
365 | (('--q4thread','--qthread','-q4thread','-qthread'), dict( |
|
334 | (('--q4thread','--qthread','-q4thread','-qthread'), dict( | |
366 |
action='store_true', dest='Global.q4thread', |
|
335 | action='store_true', dest='Global.q4thread', | |
367 | help="Enable Qt4 event loop integration. Qt3 is no longer supported. "+ |
|
336 | help="Enable Qt4 event loop integration. Qt3 is no longer supported. "+ | |
368 | "(DEPRECATED, use --gui qt)") |
|
337 | "(DEPRECATED, use --gui qt)") | |
369 | ), |
|
338 | ), | |
370 | (('--gthread','-gthread'), dict( |
|
339 | (('--gthread','-gthread'), dict( | |
371 |
action='store_true', dest='Global.gthread', |
|
340 | action='store_true', dest='Global.gthread', | |
372 | help="Enable GTK event loop integration. "+ |
|
341 | help="Enable GTK event loop integration. "+ | |
373 | "(DEPRECATED, use --gui gtk)") |
|
342 | "(DEPRECATED, use --gui gtk)") | |
374 | ), |
|
343 | ), |
General Comments 0
You need to be logged in to leave comments.
Login now