Closed MarcSkovMadsen closed 3 days ago
Somewhat related is the problem raised here, where the sidebar is not loaded when the terminal is in an accordion.
import panel as pn
pn.extension("terminal")
terminal_accordion = pn.Accordion(("Terminal", pn.widgets.Terminal()))
pn.template.FastListTemplate(main=[terminal_accordion], sidebar=["test"]).servable()
Looked at this, the problem here is that the Terminal.subprocess.run
method forks the process including the entire server, which means both processes will then send events via the websocket, messing up the protocol. There's no straightforward fix as far as I can see.
I'm on the current
main
branch of Panel trying to help Ignozalezsa in https://discourse.holoviz.org/t/terminal-how-to-finish-one-terminal-subprocess-run-before-starting-another/3004/2?u=marc.I'm trying to show how he can
subprocess.run
multiple tasks one after the other.I would expect the below code to work. But as you can see in the video
.write
command sometimes arrives before the text fromsubprocess.run
https://github.com/holoviz/panel/assets/42288570/5be9ed2b-cdfe-4c87-9548-4e76bceaba56