def _on_raw(func_name):
    """
    Like query_super, but makes the operation run on the raw string.

    """
    def wrapped(self, *args, **kwargs):
        args = list(args)
        try:
            string = args.pop(0)
            if hasattr(string, '_raw_string'):
                args.insert(0, string.raw())
            else:
                args.insert(0, string)
        except __HOLE__:
            pass
        result = getattr(self._raw_string, func_name)(*args, **kwargs)
        if isinstance(result, basestring):
            return ANSIString(result, decoded=True)
        return result
    return wrapped
dataset/ETHPy150Open evennia/evennia/evennia/utils/ansi.py/_on_raw