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