@@ 75-86 (lines=12) @@ | ||
72 | ||
73 | ||
74 | async def interactive(server): |
|
75 | while True: |
|
76 | # server.generate_condition(1) |
|
77 | # server.generate_alarm(1) |
|
78 | line = await ainput(">>> ") |
|
79 | print('execute:', line) |
|
80 | if line == 'exit': |
|
81 | break |
|
82 | try: |
|
83 | eval(line) |
|
84 | except Exception as msg: |
|
85 | print('Exception:', msg) |
|
86 | raise Exception |
|
87 | ||
88 | ||
89 | async def main(): |
@@ 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(): |