ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

vscode-jupyter does not show ANSI color codes when using the output widget

Open raldone01 opened this issue 1 year ago • 4 comments

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

raldone01 avatar Oct 21 '24 22:10 raldone01