+ 1
How can i use html in python code?
13 Réponses
+ 2
Pico Soft
According to me....
Sololearn recently added support for graphs and images in python codes and "R" language is also introduced in Sololearn code playground.
As these languages needs to show the graphs. But Sololearn code playground function like that < first compile at server end and then show the result as output (only one time run)>
So it might kinda not possible to show images with this.
So they did some sort of thing to use html(to show images) but we found more with this feature by experiments.
*That's why this thing only works when you try to create/show a image. That you do with `os.system('touch img.png')`
> 'touch' is a linux/mac command to create files
+ 4
At sololearn? This way:
import os
os.system("touch file.png")
print("<div>hi</div>")
And I don't know what this magical image is.
Maybe a professional who is interested in helping others can tell us:
Martin Taylor
+ 3
👍
+ 2
AKSHAY🇮🇳 ohhhh come on!😂😂😂
That's so ridiculous 😂😂😂😂
+ 1
I'm also interested in this
+ 1
Arsalan Martin dont uses SL app, so he will not get a notification that you have mentioned him, so avoide mentioning users in Discuss section until it is not important.
Pico Soft This question already asked, so next time try to use search bar
https://www.sololearn.com/discuss/2826179/?ref=app
+ 1
Hi AKSHAY🇮🇳.
recently I have been searched about this reason but i didn't found my answer
+ 1
AKSHAY🇮🇳 so for windows how? or it's the same?
+ 1
Pico Soft NO there is nothing like Sololearn in any other platforms either it is mac, windows or linux.
THIS ONLY WORKS IN SOLOLEARN
+ 1
Pico Soft 😆 no one can do anything about this
0
And at other platforms like pc or smart phone?
0
Html code must be interpreted by a browser (or something like that). You can cteate an html file with python, and open it manually or like this:
import webbrowser as wb
wb.open("file_name.html")