I want to create a tool using brython that translates python to js without running it. I know that there is a way to do it (i was doing some research: http://www.brython.info/tests/precompile.html or Python to JavaScript converter) but still i can't make it. The goal is to make html file like this below, but instead of copying and pasting same value to the second textarea actualy convert it to javascript?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<textarea name="input" id="input" cols="30" rows="10">Here write your python code...</textarea>
<button id="convert" onclick="convert()">Convert</button>
<textarea name="output" id="output" cols="30" rows="10">Here you will receive your javascript code...</textarea>
<script>
function convert(content)
{
var input = document.getElementById("input");
var output = document.getElementById("output");
output.innerHTML = input.innerHTML;
}
</script>
</body>
</html>
I tried to make python to js converter without frameworks such as Flask or Django, obviously it won't be a problem If you will suggest to use another js library for this like pyjs, javascrypthon or anything else.