-
Notifications
You must be signed in to change notification settings - Fork 280
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
rich.progress
support
#2846
Comments
We might need to add marimo support to Would you be open to create an issue on |
Sure. What is the logic to detect for marimo? |
@wd60622, there is this logic from another open-source project: # Check if running in a marimo notebook
try:
import marimo
return marimo.running_in_notebook()
except (ImportError, ModuleNotFoundError):
# marimo not installed
return False |
In the short term, I've been using this to monkey-patch Rich and make it think it is outputting to a terminal: import rich.console
_orig_console = rich.console.Console
class Console(_orig_console):
def __init__(self, *args, **kwargs):
kwargs["force_terminal"] = True
super().__init__(*args, **kwargs)
rich.console.Console = Console This allows the progress bar to update in real time. |
The
rich.progress
module provides progress bars for stdout. However, the result is not displayed until after the progress bar is complete which defeats the point.I've tried many of the examples in the documentation here and I have not had luck with all I have tried.
I tried on the current main branch of the marimo (0.9.17) and version of
rich
13.7.0Example code
The text was updated successfully, but these errors were encountered: