I have a need of long running a python script in linux and monitor it from streamlit.
A start button will trigger the script start and then give an option to pause/stop button. If anyone has done any work related to this please help in any suggestions or direction.
Thanks
Sai
You could look into using subprocess
to perform command line scripts from within your Streamlit app, and you could use st.button()
to trigger the script to run.
Thanks Prof for your input. I also need a way to kill the process after it is started if the user decides to, how to get the process id if we use subprocess. Suggestions appreciated.
Thanks
Sai
Use subprocess.Popen
.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.