I am using eel to communicate with python. I'm working in dir C:\Users\Desktop\Eel
where I have app.py
and inside the UI
folder I have index.html, myjava.js, style.css, images
but nothing called eel.js
. I said this because in docs it says to include script called /eel.js
.
index.html
<head>
<script type="text/javascript" language="JavaScript" src="./myjava.js"></script>
<script type="text/javascript" src="/eel.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container" onclick="runeel()">
</body>
my Javascript is:
function runeel(){
eel.runpy()
}
app.py
import eel
eel.init('UI')
eel.start('index.html', size=(900, 550))
@eel.expose
def runpy():
....code which creates an excel file in desktop...
When I run the py file, the index.html loads up and then when I click the div I get into the function and but it throws the error:
myjava.js:2 Uncaught TypeError: eel.runpy is not a function
What am I missing?