def parse_args_and_kwargs(self, cmdline):
        '''
        cmdline: list

        returns tuple of: args (list), kwargs (dict)
        '''
        # Parse args and kwargs
        args = []
        kwargs = {}

        if len(cmdline) > 1:
            for item in cmdline[1:]:
                if '=' in item:
                    (key, value) = item.split('=', 1)
                    kwargs[key] = value
                else:
                    args.append(item)
        return (args, kwargs)
def parse_args_and_kwargs ( self , cmdline ) : args = [ ] kwargs = { } if len ( cmdline ) > 1 : for item in cmdline [ 1 : ] : if '=' in item : ( key , value ) = item . split ( '=' , 1 ) kwargs [ key ] = value else : args . append ( item ) return ( args , kwargs )
cmdline: list

        returns tuple of: args (list), kwargs (dict)