1

I need suggestion on what components are required to build a Python based web page to:

  1. Take Python code in one Input text box. 2, Send code output to another text box. 3, Capable of saving some data (Eg, save code in the input box or future use)

I'm familiar with PowerShell but my experience with web and Python is next to nothing. This web based code execution is my attempt to catch up with both fields.

Any suggestion is appreciated. Thank you.

1

Flask is a lightweight Web Server Gateway Interface (WSGI) web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks. A minimal Flask application looks like this:

Hello world example (hello.py):

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run()

Install Flask and run after installing Python 3.x and pip.

$ pip3 install Flask
$ python3 hello.py
 * Running on http://localhost:5000/

flask tag at Stack Overflow

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.