-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improvement: colorize traceback #1198
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
marimo/_messaging/streams.py
Outdated
@@ -255,7 +256,7 @@ def write(self, data: str) -> int: | |||
ConsoleMsg( | |||
stream=CellChannel.STDERR, | |||
cell_id=self._stream.cell_id, | |||
data=data, | |||
data=highlight_trace_back(data), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the right place, but im not quite sure where is the right place
traceback -> tracebacks to not shadow builtin traceback module
if running_in_notebook(): | ||
sys.stderr.write(_highlight_traceback(traceback)) | ||
else: | ||
sys.stderr.write(traceback) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we could highlight with TerminalFormatter
too
Colorize traceback with pygments