Show More
@@ -158,8 +158,8 b" flags['quick']=(" | |||
|
158 | 158 | |
|
159 | 159 | flags['i'] = ( |
|
160 | 160 | {'TerminalIPythonApp' : {'force_interact' : True}}, |
|
161 | """also works as '-i' | |
|
162 | If running code from the command line, become interactive afterwards.""" | |
|
161 | """If running code from the command line, become interactive afterwards. | |
|
162 | Note: can also be given simply as '-i.'""" | |
|
163 | 163 | ) |
|
164 | 164 | flags['pylab'] = ( |
|
165 | 165 | {'TerminalIPythonApp' : {'pylab' : 'auto'}}, |
@@ -180,7 +180,6 b' aliases.update(dict(' | |||
|
180 | 180 | # Main classes and functions |
|
181 | 181 | #----------------------------------------------------------------------------- |
|
182 | 182 | |
|
183 | ||
|
184 | 183 | class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp): |
|
185 | 184 | name = u'ipython' |
|
186 | 185 | description = usage.cl_usage |
@@ -190,7 +189,8 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):' | |||
|
190 | 189 | |
|
191 | 190 | flags = Dict(flags) |
|
192 | 191 | aliases = Dict(aliases) |
|
193 |
classes = [InteractiveShellApp, TerminalInteractiveShell, ProfileDir, |
|
|
192 | classes = [InteractiveShellApp, TerminalInteractiveShell, ProfileDir, | |
|
193 | PlainTextFormatter] | |
|
194 | 194 | subcommands = Dict(dict( |
|
195 | 195 | qtconsole=('IPython.frontend.qt.console.qtconsoleapp.IPythonQtConsoleApp', |
|
196 | 196 | """Launch the IPython Qt Console.""" |
@@ -247,17 +247,14 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):' | |||
|
247 | 247 | |
|
248 | 248 | def parse_command_line(self, argv=None): |
|
249 | 249 | """override to allow old '-pylab' flag with deprecation warning""" |
|
250 | ||
|
250 | 251 | argv = sys.argv[1:] if argv is None else argv |
|
251 | ||
|
252 | try: | |
|
253 | idx = argv.index('-pylab') | |
|
254 | except ValueError: | |
|
255 | # `-pylab` not given, proceed as normal | |
|
256 | pass | |
|
257 | else: | |
|
252 | ||
|
253 | if '-pylab' in argv: | |
|
258 | 254 | # deprecated `-pylab` given, |
|
259 | 255 | # warn and transform into current syntax |
|
260 |
argv = |
|
|
256 | argv = argv[:] # copy, don't clobber | |
|
257 | idx = argv.index('-pylab') | |
|
261 | 258 | warn.warn("`-pylab` flag has been deprecated.\n" |
|
262 | 259 | " Use `--pylab` instead, or `--pylab=foo` to specify a backend.") |
|
263 | 260 | sub = '--pylab' |
General Comments 0
You need to be logged in to leave comments.
Login now