python-eel/Eel

execute python code after window is closed.

Open

#583 ouverte le 11 avr. 2022

Voir sur GitHub
 (0 commentaires) (0 réactions) (0 assignés)Python (570 forks)batch import
help wanted

Métriques du dépôt

Stars
 (5 980 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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()

Guide contributeur