You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for providing this awesome widgets!!
I have read the issue #25 and #28.
My idea is to apply the streamlit-ace to display the log file, and the log file will keep changing (i.e., It will keep adding some information into the log file.)
Here is my current code which was referred from #25.
with open('/var/log/out.log') as f:
lines = f.read()
content = st_ace(value=lines)
Is it possible to keep displaying the log file information this goal?
Thank you!!
BR,
Chieh
The text was updated successfully, but these errors were encountered:
This is inherently not how streamlit (i.e., the whole framework, not only this editor component) works. Streamlit reruns your whole script every time a widget is somehow changed. What you want is to trigger the rerun from within the script, if the log file changes. Like this:
The first half is just how streamlit works, if there's contents in the session state, display it as text*.
The second half is an infinite loop that prevents the current run of the script from ending. It reads the file every second, and if the contents of the file changed, it updates the session state and asks streamlit to rerun.
If this is all you want to achieve, it might be an OK solution.
Hi,
Thanks for providing this awesome widgets!!
I have read the issue #25 and #28.
My idea is to apply the
streamlit-ace
to display the log file, and the log file will keep changing (i.e., It will keep adding some information into the log file.)Here is my current code which was referred from #25.
Is it possible to keep displaying the log file information this goal?
Thank you!!
BR,
Chieh
The text was updated successfully, but these errors were encountered: