CodePlayground/python.html

38 lines
970 B
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<title>Python Playground</title>
<meta charset="utf-8" />
<script src="lib/codeflask.min.js"></script>
<script src="lib/prism-python.min.js"></script>
<script src="lib/brython.min.js"></script>
<script src="lib/brython_stdlib.min.js"></script>
<link rel="stylesheet" href="assets/css/main.css" type="text/css" />
</head>
<body>
<header>
<h1>Python Playground</h1>
</header>
<div id="codeContainer"><div id="code"></div></div>
<input type="button" onclick="run()" value="Exécuter !" id="runBtn" />
<div id="console">
</div>
<footer>
Romain de Laage - CC0
</footer>
<script type="text/python" id="pycode"></script>
<script src="assets/js/editor.js"></script>
<script>
const flask = getEditor("#code", "py")
function run() {
document.getElementById("pycode").innerHTML = flask.getCode()
brython({
debug:1,
ids:["pycode"]
})
}
</script>
</body>
</html>