MCPcopy Index your code
hub / github.com/prompt-toolkit/ptpython / print_counter

Function print_counter

examples/asyncio-python-embed.py:23–30  ·  view source on GitHub ↗

Coroutine that prints counters and saves it in a global variable.

()

Source from the content-addressed store, hash-verified

21
22
23async def print_counter() -> None:
24 """
25 Coroutine that prints counters and saves it in a global variable.
26 """
27 while True:
28 print(f"Counter: {counter[0]}")
29 counter[0] += 1
30 await asyncio.sleep(3)
31
32
33async def interactive_shell() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected