Commit 25a4add9 authored by Tom Niget's avatar Tom Niget

Use Unicode characters for file extract

parent 83b5b844
......@@ -93,8 +93,8 @@ def exception_hook(exc_type, exc_value, tb):
offset = start + 1
for i, line in enumerate(hg[start:last_node.end_lineno + CONTEXT_SIZE]):
erroneous = last_node.lineno <= offset + i <= last_node.end_lineno
indicator = cf.white("**>") if erroneous else " "
disp = f"\x1b[24m{indicator}{cf.white}{(offset + i):>4}{cf.red if erroneous else cf.reset} |{cf.reset} {line}\x1b[24m"
indicator = cf.white("") if erroneous else " "
disp = f"\x1b[24m{indicator}{cf.white}{(offset + i):>4}{cf.red if erroneous else cf.reset} {cf.reset} {line}\x1b[24m"
print(disp)
# print(repr(disp))
print()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment