[HTML & JS] Run a python script in a terminal-like window
Pyodide might be useful for you. It "compiles" to web assembly, but I believe it's really hacky. More than likely, to get good performance from running local languages natively in the browser, we will have to wait until web assembly is fairly mature, and offers many canonical language implementations.
An alternative is Jupyter Notebooks, which do require a server, but is specifically designed so that it can be set up to run locally only.
You could try to set up a web based SSH client in your browser, which would just connect back to to a local ssh server and allow you to do everything you can do directly from your machine. You could make things appear to be going on in a console window with some creative Javascript and CSS.
At the moment, all solutions but Pyodide are going to require you to run python in a server, it's just that a server doesn't actually have to be a server: You can run your server locally, and then just connect to it from your browser, in much the same manner that you do when working on a normal html/css/javascript client side site: This is one of the strong points behind Jupyter Notebooks: it was designed with this workflow in mind.
Be aware that you can run a server locally: i.e, on the same machine you are developing the client side stuff on. In order to do so, all you have to do is configure your server applications to run on your machine, and then configure your client applications to connect back to 127.0.0.1/WhateverPort.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now