python-eel/Eel

Close browser when python exits

Open

#520 建立於 2021年9月16日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)Python (570 fork)batch import
help wanted

倉庫指標

Star
 (5,980 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

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.

貢獻者指南