blob: 9763bfa24bf3363226c443dfb2d77d0ce55e3d89 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import cursed
import asyncio
import tele
async def on_str(s):
await tele.client.send_message("+46703279113", s)
async def on_tab():
print("tab")
def main():
messages = ["hej", "vad", "är", "klockan"]
tele.messages = messages
tele.redraw = cursed.redraw
with tele.client:
tele.client.start()
with cursed.Console() as c:
tele.client.loop.run_until_complete(cursed.start(c, on_str, on_tab, messages))
if __name__=="__main__":
main()
|