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 eel which is supposed to do that so I followed what the documentation is saying and everything looks right, I hit a button in that I built with html in which after I click this button the python script runs, but I keep getting and error in my browser console saying that eel is not defined.

note that i included this line in html as the documentation suggests: <script type=”text/javascript” src=”/eel.js”></script>

no idea what is wrong hope someone can help. thanks in advance

Milad
  • 77
  • 1
  • 2
  • 7
  • 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! – dstricks Jan 13 '22 at 19:59

1 Answers1

2

To my google search, thats not what 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 try making a web app in flask or look into Pyodide

nagol12344
  • 48
  • 4
  • 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 – Milad Dec 05 '21 at 23:42
  • eel is supposed to help me however i cant get pass that error saying eel is not defined – Milad Dec 05 '21 at 23:43
  • You cant import it as a js file, its is it own thing. NOT a addon to electron. – nagol12344 Dec 16 '21 at 01:15