Inspects a bot attribute.

    Syntax: {command} <attr>
175366
def cmd(send, msg, args):
    """'

    """
    if not hasattr(args['handler'], msg):
        send("That attribute was not found in the handler.")
        return
    send(str(getattr(args['handler'], msg)))
337649
function walkAttrs(html, fn) {
  if (!html)
    { return }
  var m;
  while (m = RE_HTML_ATTRS.exec(html))
    { fn(m[1].toLowerCase(), m[2] || m[3] || m[4]); }
}
387963
def get_attr(item, name, default=None):
    '''  '''
    try:
        val = item[name]
    except (KeyError, TypeError):
        try:
            val = getattr(item, name)
        except AttributeError:
            val = default
    return val
452727
def p_attr(p):
    
    # ATTR_LIST are used by drawing commands: PLOT, DRAW, CIRCLE
    # BOLD and ITALIC are ignored by them, so we put them out of the
    # attr definition so something like DRAW BOLD 1; .... will raise
    # a syntax error
    p[0] = make_sentence(p[1] + '_TMP',
                         make_typecast(TYPE.ubyte, p[2], p.lineno(1)))
934320
def method_missing(name, *args, &block)
      return attr(name[0..-2], args[0]) if args.size == 1 and name[-1] == '='
    end
1080316
def source_attr(attr_name):
    

    def source_attr(value, context, **_params):
        setattr(context["model"].source, attr_name, value)
        return _attr()

    return source_attr
32434
function attr(obj, key) {
    if (!obj[key]) {
      return '';
    }
    var val = obj[key];
    if (val === true) {
      return key;
    }
    return key + '="' + obj[key] + '"';
  }
1132542
def as_odict(self):
        
        if hasattr(self, 'cust_odict'):
            return self.cust_odict
        if hasattr(self, 'attr_check'):
            self.attr_check()
        odc = odict()
        for attr in self.attrorder:
            odc[attr] = getattr(self, attr)
        return odc
776448
def _traverse_command(self, name, *args, **kwargs):
        
        if not name in self.available_commands:
            raise AttributeError("%s is not an available command for %s" %
                                 (name, self.__class__.__name__))
        attr = getattr(self.connection, "%s" % name)
        key = self.key
        log.debug(u"Requesting %s with key %s and args %s" % (name, key, args))
        result = attr(key, *args, **kwargs)
        result = self.post_command(
            sender=self,
            name=name,
            result=result,
            args=args,
            kwargs=kwargs
        )
        return result
182789
def [](key, src = name.to_sym)
      attr =
        if count_index[key].equal?(1)
          name_index[key]
        else
          source_index[src][key]
        end

      unless attr
        raise(KeyError, "#{key.inspect} attribute doesn't exist in #{src} schema")
      end

      attr
    end
618751
function attr(proto, attrName) {
    var metadataManager = Vessel$$1.$container.get('@metadata_manager'), className = proto.getClassName();
    metadataManager.setAttribute(className, attrName);
}
630156
def _do_attr(self, n, value):
        '''''''

        W = self.write
        W(' ')
        W(n)
        W('="')
        s = string.replace(value, "&", "&amp;")
        s = string.replace(s, "<", "&lt;")
        s = string.replace(s, '"', '&quot;')
        s = string.replace(s, '\011', '&#x9')
        s = string.replace(s, '\012', '&#xA')
        s = string.replace(s, '\015', '&#xD')
        W(s)
        W('"')
919957
def is_attrsignal_handler(descriptor, signal_name, cb, *, defer=False):
    
    try:
        handlers = get_magic_attr(cb)
    except AttributeError:
        return False

    return _attrsignal_spec(descriptor, signal_name, cb, defer) in handlers
1371146
def set_attrs(self, **attrs):
        """"""
        commands = tuple(self.values())
        for name, value in attrs.items():
            for command in commands:
                setattr(command, name, value)
1051423
def set_attr(self, name, value):
    
    self.exec_script("node.setAttribute(%s, %s)" % (repr(name), repr(value)))
667572
def commandstr(command):
    """"""
    if command == CMD_MESSAGE_ERROR:
        msg = "CMD_MESSAGE_ERROR"
    elif command == CMD_MESSAGE_LIST:
        msg = "CMD_MESSAGE_LIST"
    elif command == CMD_MESSAGE_PASSWORD:
        msg = "CMD_MESSAGE_PASSWORD"
    elif command == CMD_MESSAGE_MP3:
        msg = "CMD_MESSAGE_MP3"
    elif command == CMD_MESSAGE_DELETE:
        msg = "CMD_MESSAGE_DELETE"
    elif command == CMD_MESSAGE_VERSION:
        msg = "CMD_MESSAGE_VERSION"
    elif command == CMD_MESSAGE_CDR_AVAILABLE:
        msg = "CMD_MESSAGE_CDR_AVAILABLE"
    elif command == CMD_MESSAGE_CDR:
        msg = "CMD_MESSAGE_CDR"
    else:
        msg = "CMD_MESSAGE_UNKNOWN"
    return msg
70407
def _generate_dom_attrs(attrs, allow_no_value=True):
    
    for attr in iterate_items(attrs):
        if isinstance(attr, basestring):
            attr = (attr, True)
        key, value = attr
        if value is None:
            continue
        if value is True and not allow_no_value:
            value = key  # E.g. <option checked="true" />
        if value is True:
            yield True  # E.g. <option checked />
        else:
            yield '%s="%s"' % (key, value.replace('"', '\\"'))