@@ 62-72 (lines=11) @@ | ||
59 | ||
60 | ||
61 | async def interactive(client): |
|
62 | while True: |
|
63 | # exit to disconnect |
|
64 | line = await ainput(">>> ") |
|
65 | print('execute:', line) |
|
66 | if line == 'exit': |
|
67 | break |
|
68 | try: |
|
69 | eval(line) |
|
70 | except Exception as msg: |
|
71 | print('Exception:', msg) |
|
72 | raise Exception |
|
73 | ||
74 | ||
75 | async def start(): |
@@ 78-89 (lines=12) @@ | ||
75 | ||
76 | ||
77 | async def interactive(server): |
|
78 | while True: |
|
79 | # server.generate_condition(1) |
|
80 | # server.generate_alarm(1) |
|
81 | line = await ainput(">>> ") |
|
82 | print('execute:', line) |
|
83 | if line == 'exit': |
|
84 | break |
|
85 | try: |
|
86 | eval(line) |
|
87 | except Exception as msg: |
|
88 | print('Exception:', msg) |
|
89 | raise Exception |
|
90 | ||
91 | ||
92 | async def main(): |