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

Terminal sometimes does not display newlines in Panel 1.5.0 #7300

Open
1 task done
dennisjlee opened this issue Sep 19, 2024 · 1 comment
Open
1 task done

Terminal sometimes does not display newlines in Panel 1.5.0 #7300

dennisjlee opened this issue Sep 19, 2024 · 1 comment

Comments

@dennisjlee
Copy link

dennisjlee commented Sep 19, 2024

ALL software version info

Software Version Info
Panel==1.5.0
Bokeh==3.5.2
jupyterlab==4.2.4
notebook==7.2.1

Description of expected behavior and the observed behavior

I have a UI that is served to users via Jupyter Notebook, which includes a pn.widgets.Terminal to show output (sys.stdout and sys.stderr have been reassigned to point to the Terminal, as suggested in the Panel docs).

Complete, minimal, self-contained example code that reproduces the issue

Please see repro here: https://github.com/dennisjlee/panel-repro/tree/terminalBug

Essentially all I'm doing is running repeated print statements in a Jupyter notebook cell, like this

for i in range(3):
    print("hello")
    print("world")

Sometimes this results in 6 lines of output, and other times it results in one line with all the words squished together.

Note that I could not reproduce this bug with Panel 1.4.5 / Bokeh 3.4.3, and I also could not reproduce this bug using panel serve instead of a jupyter notebook.

Screenshots or screencasts of the bug in action

image
  • I may be interested in making a pull request to address this
@hoxbro
Copy link
Member

hoxbro commented Sep 20, 2024

Does this still happen with print("hello", flush=True)?

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

2 participants