How to Add a Python Interpreter to a Web Application? [closed]

I am currently working on a Learning Management System (LMS) web app, and one of the features I need to implement is a web-based Integrated Development Environment (IDE) where users can write, execute, and test Python code directly in the browser.

What I am looking for:

  1. Guidance on integrating a Python interpreter into the web app.
  2. Best practices for securely running user-submitted Python code to prevent malicious activities.
  3. Recommendations for tools, libraries, or APIs that can help execute Python code. How to handle input/output in the IDE and display results to the user in real-time.

Key considerations:

  1. The web app is built using Django and react.
  2. Code execution should be sandboxed for security.
  3. The IDE should be able to handle basic Python scripts and display outputs/errors to users and suggestions too.
Back to Top