1

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

1
  • Did you figure this out? I see you're asking other questions on StackOverflow about why CSS is not being applied in your Eel project (which makes me believe you're past this particular issue). If this is no longer relevant, can you either Accept an answer or delete the question so that it no longer appears in my queue of no accepted answers? Thanks! Commented Jan 13, 2022 at 19:59

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

3 Comments

yes thats the idea i want to build a python project that has a nice ui so i went with html and css for the design however i still need python for the backend because in the end its a python project not a web project and using electron js with python is not easy and really tricky
eel is supposed to help me however i cant get pass that error saying eel is not defined
You cant import it as a js file, its is it own thing. NOT a addon to electron.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.