environment/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.py
def parse_command_line(self, argv=None):
        """override to allow old '-pylab' flag with deprecation warning"""

        argv = sys.argv[1:] if argv is None else argv

        if '-pylab' in argv:
            # deprecated `-pylab` given,
            # warn and transform into current syntax
            argv = argv[:] # copy, don't clobber
            idx = argv.index('-pylab')
            warn.warn("`-pylab` flag has been deprecated.\n"
            "    Use `--pylab` instead, or `--pylab=foo` to specify a backend.")
            sub = '--pylab'
            if len(argv) > idx+1:
                # check for gui arg, as in '-pylab qt'
                gui = argv[idx+1]
                if gui in ('wx', 'qt', 'qt4', 'gtk', 'auto'):
                    sub = '--pylab='+gui
                    argv.pop(idx+1)
            argv[idx] = sub

        return super(TerminalIPythonApp, self).parse_command_line(argv)
def parse_command_line(self, argv=None):
        argv = sys.argv[1:] if argv is None else argv

        if '-pylab' in argv:
            # deprecated `-pylab` given,
            # warn and transform into current syntax
            argv = argv[:] # copy, don't clobber
            idx = argv.index('-pylab')
            warn.warn("`-pylab` flag has been deprecated.\n"
            "    Use `--pylab` instead, or `--pylab=foo` to specify a backend.")
            sub = '--pylab'
            if len(argv) > idx+1:
                # check for gui arg, as in '-pylab qt'
                gui = argv[idx+1]
                if gui in ('wx', 'qt', 'qt4', 'gtk', 'auto'):
                    sub = '--pylab='+gui
                    argv.pop(idx+1)
            argv[idx] = sub

        return super(TerminalIPythonApp, self).parse_command_line(argv)
def parse_command_line ( self , argv = None ) : argv = sys . argv [ 1 : ] if argv is None else argv if '-pylab' in argv : # deprecated `-pylab` given, # warn and transform into current syntax argv = argv [ : ] # copy, don't clobber idx = argv . index ( '-pylab' ) warn . warn ( "`-pylab` flag has been deprecated.\n" "    Use `--pylab` instead, or `--pylab=foo` to specify a backend." ) sub = '--pylab' if len ( argv ) > idx + 1 : # check for gui arg, as in '-pylab qt' gui = argv [ idx + 1 ] if gui in ( 'wx' , 'qt' , 'qt4' , 'gtk' , 'auto' ) : sub = '--pylab=' + gui argv . pop ( idx + 1 ) argv [ idx ] = sub return super ( TerminalIPythonApp , self ) . parse_command_line ( argv )
override to allow old '-pylab' flag with deprecation warning
override to allow old - pylab flag with deprecation warning