Eel icon indicating copy to clipboard operation
Eel copied to clipboard

Close browser when python exits

Open mosindy opened this issue 4 years ago • 2 comments

When I exit the python script, it will leave the browser running.

In my case it's during an exposed python function. I look for some file resources that are required on start, and if they don't exist, the python script just exit()s out. This is a hard failure and shouldn't happen in production, but when this happens, the browser stays open, I have to close it with another click.

Any thoughts? is there an eel command to close the browser window first?

Edit: Running python 3.9 in windows 10. Working with Chrome and Edge browsers in this case. I didn't test with others.

mosindy avatar Sep 16 '21 00:09 mosindy

The alternative is to display an error in the browser window and make the user close it. For now this is what I will do. It's just extra effort I was going to avoid. Still interested if this is possible.

mosindy avatar Sep 16 '21 00:09 mosindy

did you get the solution for this?

mdhuzaifapatel avatar Nov 06 '23 06:11 mdhuzaifapatel