MCPcopy
hub / github.com/secdev/scapy / __str__

Method __str__

scapy/config.py:83–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

81 return str(self)
82
83 def __str__(self):
84 # type: () -> str
85 s = ""
86 dkeys = self.__class__.__dict__.copy()
87 dkeys.update(self.__dict__)
88 keys = sorted(dkeys)
89 for i in keys:
90 if i[0] != "_":
91 r = repr(getattr(self, i))
92 r = " ".join(r.split())
93 wlen = 76 - max(len(i), 10)
94 if len(r) > wlen:
95 r = r[:wlen - 3] + "..."
96 s += "%-10s = %s\n" % (i, r)
97 return s[:-1]
98
99
100class Interceptor(object):

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
copyMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected