(self, args)
return args
Parse GW-BASIC-style options.
Parse GW-BASIC-style options.
Parse GW - BASIC - style options .
def _parse_gw_options(self, args):
        """Parse GW-BASIC-style options."""
        options = args.pop('options', '')
        for option in options.split(u' '):
            if not option:
                continue
            try:
                arg, val = GW_OPTIONS[option[:2].lower()], option[2:]
            except KeyError:
                try:
                    arg, val = GW_OPTIONS[option[:1]], option[1:]
                except KeyError:
                    # positional argument
                    arg, val = 0, option
            if val[:1] == u':':
                val = val[1:]
            arg, suffix = split_pair(arg, split_by=':', quote='"\'')
            args[arg] = val + (u':' + suffix if suffix else u'')
        return args
def _parse_gw_options ( self , args ) : options = args . pop ( 'options' , '' ) for option in options . split ( u' ' ) : if not option : continue try : arg , val = GW_OPTIONS [ option [ : 2 ] . lower ( ) ] , option [ 2 : ] except KeyError : try : arg , val = GW_OPTIONS [ option [ : 1 ] ] , option [ 1 : ] except KeyError : # positional argument arg , val = 0 , option if val [ : 1 ] == u':' : val = val [ 1 : ] arg , suffix = split_pair ( arg , split_by = ':' , quote = '"\'' ) args [ arg ] = val + ( u':' + suffix if suffix else u'' ) return args