+ 1

How the users of this platform are able to execute HTML, CSS and JavaScript code in the python environment ?

6th Apr 2021, 2:40 AM
Prince Gupta
Prince Gupta - avatar
5 Réponses
+ 1
What do you mean by "environment" and "this platform"? Visual Studio Code for ex. has a lot of extensions with support of different PL. In SL you can also chose the lang you want to write a code... But if you ask inside python code execute html css js... then you are thinking wrong... Such frameworks as django, flask, tornado works in server side
6th Apr 2021, 4:43 AM
Shadoff
Shadoff - avatar
+ 1
For Example : import os print('<h6>HTML in Python 🐍\ <h3>HTML in Python 🐍\ <h1>HTML in Python 🐍')
6th Apr 2021, 6:10 AM
Prince Gupta
Prince Gupta - avatar
+ 1
By the term, 'environment', I'm referring to the Python Interpreter and 'this platform' is being referred to SoloLearn.
6th Apr 2021, 6:12 AM
Prince Gupta
Prince Gupta - avatar
+ 1
Oh, I see. instead of writing html code in python file, better to write python code in html file. To perform it. You need to install brython package first. then in script tag as same as js code... Write python code. Brython converts python code to js code... And then browser render it as html
6th Apr 2021, 6:28 AM
Shadoff
Shadoff - avatar
0
Does it mean that Sololearn uses Brython for the execution of the python code ?
11th Apr 2021, 4:49 AM
Prince Gupta
Prince Gupta - avatar