Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Integrating html, css, and python

I am building a web application that contains calculators for various industries. I am using html and css for the layout(color, size, etc). However, the core funtionality like arithmetic operations will be done using pure python programming and not javascript. So I will have html, css, and python files. Question is - how can I link my python file to html?

like image 340
ForestProgramming Avatar asked Nov 01 '25 09:11

ForestProgramming


2 Answers

You can't use python to run in the browser on the client's machine in the same way as JS, just because browsers are built to execute JS and not Python. However if all you want to do in the python is backend work, that is definitely possible.

I would suggest looking at Flask a popular python web framework that is quite easy to get started with.

like image 192
byake Avatar answered Nov 03 '25 00:11

byake


I could think of two easy ways right away, either stick to a solid framework, like django. Or you can make python scripts that manipulate .js files since text manipulation is easy and fun in python. But there are many more possibilities, like Flask and more.

like image 32
CanCode Avatar answered Nov 03 '25 00:11

CanCode