Skip to content
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

ANSI color codes are stripped when using the output widget #3957

Open
raldone01 opened this issue Oct 21, 2024 · 0 comments
Open

ANSI color codes are stripped when using the output widget #3957

raldone01 opened this issue Oct 21, 2024 · 0 comments

Comments

@raldone01
Copy link

Description

Ansi color codes are stripped and no color is shown in output captured by the output widget.

Reproduce

import ipywidgets as widgets

print("\033[91mHello World\033[0m")
output = widgets.Output()
output.append_stdout("\033[91mHello World\033[0m")
output

image

Expected behavior

Both lines are colored red.

Context

  • ipywidgets version 8.1.5
  • Operating System and version: WIN11
  • Browser and version: VSCODE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant