import html

#encodedText = html.escape('<html></html>')

#decodedText = html.unescape(encodedText)

#nom du fichier .py

name = "graphe"

f = open(name + ".py","r")

texte = f.read()

f.close()

texte = html.escape(texte)

texte = texte.replace(" ","&nbsp;")

texte = texte.replace("\n","<br>\n")

f = open(name + ".html","w")

f.write(texte)

f.close()
Affichages : 1676