Check-in [bda234f8c1]
Overview
| Comment: | Suppress ANSI codes for windows cmd |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
bda234f8c1aa9416758a415fbec9682c |
| User & Date: | mario on 2016-12-11 13:31:14 |
| Other Links: | manifest | tags |
Context
|
2016-12-11
| ||
| 13:31 | Fix $kwargs for PS2.0 check-in: b2f32bc1eb user: mario tags: trunk | |
| 13:31 | Suppress ANSI codes for windows cmd check-in: bda234f8c1 user: mario tags: trunk | |
|
2016-12-10
| ||
| 23:18 | Ad iheartadio to links list check-in: f2d026c234 user: mario tags: trunk | |
Changes
Modified config.py from [f1b79c6976] to [fb139701ee].
| ︙ | ︙ | |||
336 337 338 339 340 341 342 |
def log_print(self, *args, **kwargs):
# debug level
method = self.method.upper()
if method != "ERR":
if "debug" in conf and not conf.debug:
return
# color/prefix
| > > > | | 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 |
def log_print(self, *args, **kwargs):
# debug level
method = self.method.upper()
if method != "ERR":
if "debug" in conf and not conf.debug:
return
# color/prefix
if conf.windows:
method = "[%s]" % method
else:
method = r"[{}[{}][0m".format(self.colors.get(method.split("_")[0], "47m"), method)
# output
print(method + " " + " ".join([str(a) for a in args]), file=sys.stderr)
# Colors
colors = {
"ERR": "31m", # red ERROR
"INIT": "38;5;196m", # red INIT ERROR
|
| ︙ | ︙ |