MCPcopy
hub / github.com/DedSecInside/TorBot / color

Class color

torbot/modules/color.py:25–47  ·  view source on GitHub ↗

Class that contains colors used for TorBot in terminal and a method that adds color to a string. Attributes: message (string): Message to be wrapped in color. selected (string): Color to be displayed.

Source from the content-addressed store, hash-verified

23
24
25class color:
26 """
27 Class that contains colors used for TorBot in terminal and a method
28 that adds color to a string.
29
30 Attributes:
31 message (string): Message to be wrapped in color.
32 selected (string): Color to be displayed.
33 """
34
35 def __init__(self, message, selected):
36 """Initialise color object with specified text and selected color."""
37 self._msg = message
38 self._color = COLORS[selected]
39
40 def __str__(self):
41 return self._color + self._msg + COLORS['end']
42
43 def __add__(self, other):
44 return str(self) + other
45
46 def __radd__(self, other):
47 return other + str(self)

Callers 3

print_tor_ip_addressFunction · 0.90
print_headerFunction · 0.90
insertMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected