jeudi 2 décembre 2021

Trying to run Python console on a web page without a code editor

I'm having hell Googling this problem:

I'm setting up a website to showcase some student work and I'd like to include programs from an Intro to Python 3 course. In the class, they each made a text-based dungeon crawler that runs in the terminal. It's completely text-based, so it prints to the terminal and accepts typed input there.

I have found a great many solutions, however, they all show the source code, which isn't ideal. My fantasy scenario is to set each up with a page that has a "Run" button and the terminal, and that's it. The code neatly tucked away in a file or embedded in the page. It doesn't have to be secure or secret, I just want things to be tidy and not intimidating to the uninitiated.

Can anyone direct me to a fairly straight-forward solution?

Thank you.




Aucun commentaire:

Enregistrer un commentaire