cs01 / pyxtermjs

A fully functional terminal in your browser.
MIT License
361 stars 92 forks source link

Use bocadillo and async+await to get new pty output #3

Closed cs01 closed 4 years ago

cs01 commented 5 years ago

pyxterm.js uses flask+flask-socketio on the backend. To get new output from the pty, it runs socketio.sleep() and checks for new output in an endless loop.

It would be better if it could use async+await to immediately forward the new output over a websocket. The new async web framework Bocadillo would be a good alternative to try since it now has websocket support https://github.com/bocadilloproject/bocadillo/issues/75.

https://github.com/bocadilloproject/bocadillo