(self, argv)
return step == 2
Parse a command line string.
        Divides the string in three blocks: general_options,
        command name, and command options+arguments
Parse a command line string.
        Divides the string in three blocks: general_options,
        command name, and command options+arguments
Parse a command line string . Divides the string in three blocks : general_options command name and command options + arguments
def parse(self, argv):
        """Parse a command line string.
        Divides the string in three blocks: general_options,
        command name, and command options+arguments
        """
        step = 1
        for arg in argv[1:]:
            if not arg:
                continue

            if step == 1:
                if arg[0] in string.ascii_letters:
                    self._argv_split['CMD'] = arg
                    step = 2
                else:
                    self._argv_split['GEN_OPT'].append(arg)
            elif step == 2:
                self._argv_split['CMD_OPT'].append(arg)

        return step == 2
def parse ( self , argv ) : step = 1 for arg in argv [ 1 : ] : if not arg : continue if step == 1 : if arg [ 0 ] in string . ascii_letters : self . _argv_split [ 'CMD' ] = arg step = 2 else : self . _argv_split [ 'GEN_OPT' ] . append ( arg ) elif step == 2 : self . _argv_split [ 'CMD_OPT' ] . append ( arg ) return step == 2