-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
43 lines (40 loc) · 1.28 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
- numpy
- paths:
- /Grafo.py
- /analiseSintatica.py
- /main2.py
- /analiseLexicaScanner.py
- /analiseSemanticaOptimizacao.py
</py-env>
</head>
<body>
<div class = "wrapper">
<textarea type="text" id="test-input">While</textarea>
<textarea id="test-output"></textarea>
<button id="submit-button" class = "save-py" pys-onClick="my_function">Compilar</button>
</div>
<py-script>
from js import console
from main2 import main
def my_function(*args, **kwargs):
text = Element('test-input').element.value
lista = text.splitlines()
lista2 = []
lista2 = main(lista)
#console.log(f'text: {text[0]}')
Element('test-output').element.innerText = lista2
lista2.clear()
lista.clear()
</py-script>
</body>
</html>