python-eel/Eel

execute python code after window is closed.

Open

#583 创建于 2022年4月11日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)Python (570 fork)batch import
help wanted

仓库指标

Star
 (5,980 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Describe the problem I want to run one/two python code after my GUI gets closed.

I already use a location.realod() function in some places, which is why i cant use js (beforeunload). Therefore I wanted to know at which point in the project I would have to put my python code. I have a while loop for eel.sleep. But when I close and try to print something afterwards it doesnt happen. I assume it would have to go in another place


def main():
    app = App()
    app.mainloop()
    print("Hello world")
if __name__ == '__main__':
    main()

贡献者指南