Milad
Milad

Reputation: 77

Couldn't Run Python Code from JavaScript using Eel

So for a good time I was searching for a way to run a Python script directly from JavaScript and that was when I found something called Python-Eel, which is supposed to do that. So I followed the Hello World example. I built with a HTML, in which after I click a button, the Python script runs, but I keep getting and an error in my browser console saying that "Eel" is not defined.

I included this line in the HTML as the documentation suggests:

<script type=”text/javascript” src=”/eel.js”></script>

from Exposing Functions in the Git repository

Upvotes: 1

Views: 341

Answers (1)

nagol12344
nagol12344

Reputation: 48

To my google search, that's not what Python-Eel does. Its job to be used is a Electron-like tool for Python, NOT to make web apps have Python in them.

If you want python in a browser, please consider making a web app with Flask or look into Pyodide

Upvotes: 2

Related Questions