Is there a way to run a python script when loading an HTML page, to place variables on a page and set python variables based on <input>s? I already know python, and don’t want to learn another language just for this.
Is there a way to run a python script when loading an HTML page,
Share
You can use a web framework such as Flask or Django for this purpose. It allows you to construct a web page using Python. It also allows you to use a database from which you can retrieve and store data.
Both Flask and Django use a template engine that you can use to create HTML templates. You can pass variables to these templates and you can then place the values where you want.