MCPcopy Create free account
hub / github.com/CaliDog/certstream-python / _animate_waiter

Method _animate_waiter

examples/gui.py:126–154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 self.loop.draw_screen()
125
126 def _animate_waiter(self):
127 if self.seen_message:
128 return
129
130 skel = u"|{}==={}|"
131
132 WIDTH = 28
133
134 cycle = itertools.cycle(range(1, WIDTH) + list(reversed(range(0, WIDTH-1))))
135
136 def _anim(loop, args):
137 INTRO_MESSAGE, gui = args
138 if gui.seen_message:
139 return
140
141 step = next(cycle)
142
143 text = INTRO_MESSAGE.format(
144 skel.format(
145 " " * step,
146 " " * ((WIDTH - step) - 1)
147 )
148 )
149
150 gui.intro_frame.original_widget.original_widget.set_text(text)
151
152 loop.set_alarm_in(0.1, _anim, (INTRO_MESSAGE, gui))
153
154 self.loop.set_alarm_in(0.1, _anim, (self.INTRO_MESSAGE, self))
155
156 def _animate_heartbeat(self, _=None, stage=0):
157 if stage == 0:

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected