console.py
def default(self, line):
        """default method to use with command()"""
        line = line.replace('(', ' ').replace(')', ' ').replace('.', ' ')
        line = line.replace(',', '').replace("'", '').replace('"', '')
        args = line.split(" ")
        args.remove("")
        if len(args) > 1:
            cmd = args[1]
            args.remove(cmd)
        if cmd == "update":
            if "{" in line:
                line = line.replace('{', '').replace('}', '').replace(':', '')
                args = line.split(" ")
                args.remove("")
                static = args[0] + " " + args[2]
                while len(args) >= 5:
                    variable = args[3] + " " + args[4]
                    args.remove(args[3])
                    args.remove(args[3])
                    argument = static + " " + variable
                    eval('self.do_update' + '(argument)')
                return
        argument = ""
        for arg in args:
            argument = argument + arg + " "
        try:
            eval('self.do_' + cmd + '(argument)')
        except:
            print("** invalid command **")
default method to use with command()
default method to use with command()
default method to use with command ()
def default(self, line):
        line = line.replace('(', ' ').replace(')', ' ').replace('.', ' ')
        line = line.replace(',', '').replace("'", '').replace('"', '')
        args = line.split(" ")
        args.remove("")
        if len(args) > 1:
            cmd = args[1]
            args.remove(cmd)
        if cmd == "update":
            if "{" in line:
                line = line.replace('{', '').replace('}', '').replace(':', '')
                args = line.split(" ")
                args.remove("")
                static = args[0] + " " + args[2]
                while len(args) >= 5:
                    variable = args[3] + " " + args[4]
                    args.remove(args[3])
                    args.remove(args[3])
                    argument = static + " " + variable
                    eval('self.do_update' + '(argument)')
                return
        argument = ""
        for arg in args:
            argument = argument + arg + " "
        try:
            eval('self.do_' + cmd + '(argument)')
        except:
            print("** invalid command **")
def default ( self , line ) : line = line . replace ( '(' , ' ' ) . replace ( ')' , ' ' ) . replace ( '.' , ' ' ) line = line . replace ( ',' , '' ) . replace ( "'" , '' ) . replace ( '"' , '' ) args = line . split ( " " ) args . remove ( "" ) if len ( args ) > 1 : cmd = args [ 1 ] args . remove ( cmd ) if cmd == "update" : if "{" in line : line = line . replace ( '{' , '' ) . replace ( '}' , '' ) . replace ( ':' , '' ) args = line . split ( " " ) args . remove ( "" ) static = args [ 0 ] + " " + args [ 2 ] while len ( args ) >= 5 : variable = args [ 3 ] + " " + args [ 4 ] args . remove ( args [ 3 ] ) args . remove ( args [ 3 ] ) argument = static + " " + variable eval ( 'self.do_update' + '(argument)' ) return argument = "" for arg in args : argument = argument + arg + " " try : eval ( 'self.do_' + cmd + '(argument)' ) except : print ( "** invalid command **" )
default method to use with command()
default method to use with command ()
"""default method to use with command()"""
self
line