+ 1
Can we insert a code of python for example to do some work in html file for example ?
Can we mix many programming languages in one file? And how we can do this??
4 Answers
+ 3
Since Python, C family, node.js are server-side programming languages so you can't pass server-side code to work in client-side, instead they created new languages allows you to render the web content e.g. ejs is javascript framework used at rendering web content for the client, dynamical, another example razor uses c# or VB and html5
To create active server pages
I hope that's helped..
+ 2
if you only want to run something like a python file, you can do it with php for example with exec("python [path_to_file/file.py]");
Or other programming languages with cmd commands
But it's not a performant way.
+ 1
Its possible btw
https://www.sololearn.com/discuss/1613382/?ref=app
there are brython for py3 and skuplt for py2 to use python in browser.
- 1
You cant use python on a Web site Since Python is OOP based program language but try to use something web based such as Js(JavaScript)