-
Notifications
You must be signed in to change notification settings - Fork 6
Handle clear output msg #113
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
Handle clear output msg #113
Conversation
|
@ellisonbg |
| if target_cell is not None: | ||
| target_cell["outputs"].clear() | ||
| self.log.info(f"Cleared outputs for ydoc: {room_id} {cell_index}") | ||
| self.log.info(f"Cleared outputs for {self._file_id=}, {cell_index=}") |
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.
Cool! Never seen this before.
dlqqq
left a comment
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.
@3coins Very cool, thanks! Tested this locally and it works well. Left some feedback on the code, but none of it is blocking since this works as-is. 👍
|
@dlqqq |
|
Have you tried a non-widgets example: from IPython.display import clear_output
import time
for i in range(5):
print(f"Iteration: {i}")
time.sleep(1)
clear_output(wait=True)
print("Loop finished") |
|
@ellisonbg Screen.Recording.2025-06-13.at.9.46.36.AM.mov |
dlqqq
left a comment
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.
Looks great, thank you!
Fixes #95
Sample code to test: