-
Notifications
You must be signed in to change notification settings - Fork 350
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
Formatting of stdout stream #720
Comments
hi @TobiasEnergyMachines, you might find better success using Can you give those a try (referencing the docs) and let us know if something could be improved? |
Thank you for the suggestions. I have tried to use mo.capture_stdout() together with mo.output.append() and mo.output.replace(). In both cases I find that the output from the subprocess is only printed after completion of the subprocess (i.e. blocking). This can be verified from this example:
The closest thing I got to a solution is the following example. The issue I have with this solution is that it is overriding the cell output when it is streaming the subprocess output. Also it is resetting the tab selection which is not ideal:
Best regards Tobias |
Description
Hi Marimo team
Thanks for the fix for "plotly mapbox styles".
I am running an executable using subprocess.Popen and would like to stream the stdout "live" (the process sometimes run up to minutes and I would like to see the stdout stream as soon as it is generated from the executable) . I have attempted to use https://docs.marimo.io/api/outputs.html#marimo.redirect_stdout but I find it limiting since:
-I am not able to stream the stdout into a text-field or accordion (would like to get the stdout stream into a tab).
-I am not able to limit the length of the output view in app mode (like there is limit to cell output in edit mode).
Would you be able to help with this?
Best regards Tobias
Example
Example of capturing subprocess stdout with marimo.redirect_stdout(). This showcases current limitations:
Alternative
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: