This video is a quick look at the Python Eel library. This library allows us to create Python GUIs using HTML, CSS and JavaScript rendered in a special Chrome window. It provides a connection between Python and a Chrome app window so we can communicate between them.

This is a very quick look into the library and it is recommended you pause on each minor step. For a more detailed and slower look at this library, go to:

Here you will find the code and everything explained.

📺 Auto Py to Exe:
📺 Convert PY to EXE:

🐍 In this video I use Python 3.5.
👍🏼 Feel free to comment with any issues.

Nguồn:https://madisonrep.org/

44 Comments

Andrew Reynolds

February 20, 2020

Can I do like removing the title bar, fixing the window size and other things like that?

Reply

Bhavya Joshi

February 20, 2020

I want to convert this py file to exe file using command "python -m eel myfile.py web –onefile" but I'm getting an error pyi_rth_win32comgenpy
Please help me

Reply

Sanjay G

February 20, 2020

Can I use this to convert my django project to exe?

Reply

d d

February 20, 2020

Thank you,you helped me very much

Reply

Zeyad Abd

February 20, 2020

for me it sais :
Error: 404 Not Found

Sorry, the requested URL 'http://localhost:8000/main.html' caused an error:

File does not exist.

Reply

don-broo marquis

February 20, 2020

I'm asking if Ican make website with eel

Reply

Ucup The Tech Guy

February 20, 2020

eel is not defined

Reply

Saad Naseem

February 20, 2020

Why not flask?

Reply

don-broo marquis

February 20, 2020

eel to exe tells me: ( filenotfounderror: [errno 2] no such file or directory: 'eel' ) in auto-py-to-exe-master

Reply

don-broo marquis

February 20, 2020

how can i get a many values with one button with eel

Reply

HobbyAlchemist

February 20, 2020

would passing arrays of ints or floats work?

Reply

zhengyang tham

February 20, 2020

may i know what software i have to download to perform python GUI

Reply

Belinga Mikael

February 20, 2020

Lol is that the way you can teach people :rolling_on_the_floor_laughing:

Reply

Timothy Malahy

February 20, 2020

2 questions

1. What did you say is the version of chrome without the bookmarks and url?

2. Could this be used to pass the details into a web form similar to how selenium does?

Reply

Spimy

February 20, 2020

How do I change the icon in the taskbar and in the titlebar?

Reply

Jizin

February 20, 2020

I'm getting this error
eel.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
Even though I use init('web'')
when I run app.py, it searches for index.html from localhost not the web folder, how do I fix this?

Reply

Zia Khan

February 20, 2020

it show the html page when i load the /eel.js in html then it is showing me … This site can’t be reached localhost refused to connect.Search Google for localhost 8000 main

ERR_CONNECTION_REFUSED.. what should i do now

Reply

Marcelo Vincenzi

February 20, 2020

I am getting oserror when executing my eel project. It says port 8000 is being used by another program. If you could help me with this, please, I would thank you a lot.

Reply

Junaid Ejaz

February 20, 2020

how can I display python print() statements on HTML webpage using javascript?

Reply

soumilshah1995

February 20, 2020

Question regarding Eel Python

I have a simple code in python which returns random. numbers and its is exposed to eel
i have a simple html page where i want to display this data
I am able to get the first sample but the the next sample are updating on python shell but not on the website i have to manually left click and refresh it
can someone help with this issue

import eel
import random

eel.init('web')

@eel.expose
def random_data():

data = random.randint(0, 20)
print(data)
return data
eel.start('JumBo.html', size=(800, 800), block=False) # Start

while 1:
random_data()
eel.sleep(4)

===============================
<script type="text/javascript">
eel.random_data()(my_func);
function my_func(x){
console.log(x);
var par = document.querySelector('.data');
par.innerHTML = "Data" + x ;
}
</script>

Reply

Endless Void Studios

February 20, 2020

awesome vid this is really interesting curious through dose this have any particular advantages to just writing the same kind of web page with code exposed in Flask for example ?

Reply

Mariano Miliozzi

February 20, 2020

Hi, i'm getting this error, ModuleNotFoundError: No module named 'eel', and I allready installed it… why?

Reply

FK Production

February 20, 2020

Hi, Im writing an app, everything worked fine, but I dont know what happened suddenly my app doesnt react to javascript onclick events… I was trying this in brackets app and it works fine there. Can someone help, please?

Reply

Vivek Praharsha

February 20, 2020

How can i make it independent of any browser…?

Reply

Vertigo

February 20, 2020

thats a lot of work for a button

Reply

Nathan Russell

February 20, 2020

Hey, has anyone been able to get css to work with this? I can't seem to get it to work… please help

Reply

Thiago Vieira

February 20, 2020

Very interesting thing but ultra fast explanations.

Reply

Merlin R

February 20, 2020

this is exactly what i was looking for, thank you

Reply

Okan Ozdemir

February 20, 2020

U are a riot! Thanks

Reply

alina Sarah

February 20, 2020

I am having error that says file no found!

Reply

alina Sarah

February 20, 2020

Is there any way that if I click on HTML button it will run my python file ? I want to work offline and to avoid ajax!

Reply

kyznectortube

February 20, 2020

wtf :|, pile of hours killed without result. And only after researching your video tutorial text version, i found the hole in my super basic code … keep the beat!

Reply

ScaraMental

February 20, 2020

Bet you won't love and pin this 😉

Reply

Sarmad Akram

February 20, 2020

Amazingggg!!!! If it is possible to change the py to exe for other computers who don't have python installed.

Reply

Just simple

February 20, 2020

I just started using this module and mehn, it's wonderful…but sometimes , it has problem loading the chrome window, saying "chrome is not responding", pls is there any way of fixing this ??

Reply

kiran chinna

February 20, 2020

Thanks this helped me allot sir

Reply

Stuart Black

February 20, 2020

I require a program that will run on windows or mac that facilitates communication with other machines over TCP/IP, e.g., click a button on a GUI to tell a remote Raspberry Pi to turn on an LED. Would python and eel be a logical solution for the GUI? If not, any ideas for a better solution? Thanks in advance.

Reply

Manfred Orse

February 20, 2020

voice changer?

Reply

KingJacker

February 20, 2020

I get this error message in my console.

Refused to load the script 'http://localhost:8000/eel.js' because it violates the following Content Security Policy directive: "script-src 'none'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Reply

Muhammed Ali

February 20, 2020

thanks! for your great help.

Reply

Michael Undismayed

February 20, 2020

Great library. I have tried the Flask and Django frameworks on Electron.js. But when Electron.js rendered the interface in every process, it caused a delay of 5 6 seconds in the two frameworks. The Eel library made it incredibly easy for me.

Reply

Daniel Hernández

February 20, 2020

I have this error.. AttributeError: 'module' object has no attribute 'say_hello_js'

Reply

Mansour Job Diop

February 20, 2020

Did you try to interface data exchange, between Python and JS, with JSON???

Reply

孙维松

February 20, 2020

how can I combine eel with vue.js

Reply

Leave a Reply