override to allow old '-pylab' flag with deprecation warning
(self, argv=None)
| 287 | something_to_run=Bool(False) |
| 288 | |
| 289 | def parse_command_line(self, argv=None): |
| 290 | """override to allow old '-pylab' flag with deprecation warning""" |
| 291 | |
| 292 | argv = sys.argv[1:] if argv is None else argv |
| 293 | |
| 294 | if '-pylab' in argv: |
| 295 | # deprecated `-pylab` given, |
| 296 | # warn and transform into current syntax |
| 297 | argv = argv[:] # copy, don't clobber |
| 298 | idx = argv.index('-pylab') |
| 299 | warnings.warn("`-pylab` flag has been deprecated.\n" |
| 300 | " Use `--matplotlib <backend>` and import pylab manually.") |
| 301 | argv[idx] = '--pylab' |
| 302 | |
| 303 | return super(TerminalIPythonApp, self).parse_command_line(argv) |
| 304 | |
| 305 | @catch_config_error |
| 306 | def initialize(self, argv=None): |