Mercurial > libervia-backend
comparison sat_frontends/jp/cmd_debug.py @ 3407:2f0be2b7de68
jp: replace `no_lf` argument by `end` in `disp` (same as in `print`)
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 12 Nov 2020 14:53:16 +0100 |
parents | 559a625a236b |
children | be6d91572633 |
comparison
equal
deleted
inserted
replaced
3406:4c15271118a2 | 3407:2f0be2b7de68 |
---|---|
201 if not attr.startswith('A_'): | 201 if not attr.startswith('A_'): |
202 continue | 202 continue |
203 color = getattr(C, attr) | 203 color = getattr(C, attr) |
204 if attr == 'A_LEVEL_COLORS': | 204 if attr == 'A_LEVEL_COLORS': |
205 # This constant contains multiple colors | 205 # This constant contains multiple colors |
206 self.disp('LEVEL COLORS: ', no_lf=True) | 206 self.disp('LEVEL COLORS: ', end=' ') |
207 for idx, c in enumerate(color): | 207 for idx, c in enumerate(color): |
208 last = idx == len(color)-1 | 208 last = idx == len(color)-1 |
209 self.disp(c + f'LEVEL_{idx}' + A.RESET + (', ' if not last else ''), no_lf=not last) | 209 end = '\n' if last else ' ' |
210 self.disp( | |
211 c + f'LEVEL_{idx}' + A.RESET + (', ' if not last else ''), | |
212 end=end | |
213 ) | |
210 else: | 214 else: |
211 text = attr[2:] | 215 text = attr[2:] |
212 self.disp(A.color(color, text)) | 216 self.disp(A.color(color, text)) |
213 self.host.quit() | 217 self.host.quit() |
214 | 218 |