MCPcopy Create free account
hub / github.com/ChunelFeng/CGraph / MyPrintEvent

Class MyPrintEvent

python/tutorial/MyGEvent/MyPrintEvent.py:13–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11from pycgraph import GEvent
12
13class MyPrintEvent(GEvent):
14 _times: int = 0
15
16 def trigger(self, _):
17 time.sleep(1)
18 p1 = self.getGParamWithNoEmpty('param1')
19 self._times += 1
20 print(' ----> trigger {0} times, val = {1}'.format( self._times, p1.value))

Callers 1

tutorial_eventFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected