Sorry for my English. I am want to study python library (eel). I am wrote the following code as in the example from the documentation: The "index.html" file is located in the "Web" folder:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hello</title>
<script type="text/javascript" src="/eel.js"></script>
<script type="text/javascript">
eel.python_func("Hello from Python");
</script>
</head>
<body>
Hello!!
</body>
</html>
The "main.py" file is located one level above the "index.html" file:
import eel
eel.init("web")
@eel.expose
def python_func(text):
print(text)
eel.start("index.html")
Running main.py displays a browser window that says "Hello !!" but python_func() dont started. Message "Hello from Python" dont displayed in terminal. I am tried different options for solutions to problem:
- reinstalled eel
- reinstalled python
- pasted the python_func () function code right after import. But this solutions not helped.
I ask for help in solving my problem. I am using Python 3.7.6 32 bit