Exit handler for derived app class? #3838
Replies: 1 comment 2 replies
-
You could handle the unmount message. I.e. add |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
(Apologies if this is a general Python question versus a specific Textual one.)
I have a Textual program with an my own derived App class.
I would like to wrap some cleanup code in a function inside my derived App class.
I notice that app.py has an _on_exit_app but it is asynchronous and I am not certain how or if to overload this.
I might attempt this:
What does not make sense in this crude example is that I am calling await twice. So it is "blocking" twice?
Is this the correct way to write exit handling in an App or is there a better way?
--Evan
Beta Was this translation helpful? Give feedback.
All reactions