简体   繁体   中英

cant run a python script 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 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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM