def split_repr(self):
    alist = [(str(k), normalize_repr(v))
        for k, v in self._repr_attrs().items()]
    alist.sort()
    words = self._repr_words()
    if not words and not alist:
        # if we're just going to print the classname fall back
        # to the previous __repr__ implementation instead
        return super(self.__class__, self).__repr__()
    if words and alist: words.append("")
    return "<%s %s>" % (self.__class__.__name__,
        " ".join(words) +
        " ".join(["%s=%s" % itm for itm in alist]))
Get NIC stats (isup, duplex, speed, mtu).
dataset/ETHPy150Open AnyMesh/anyMesh-Python/example/urwid/split_repr.py/split_repr--crossover with--dataset/ETHPy150Open giampaolo/psutil/psutil/_pssunos.py/net_if_stats