Mike Driscoll
Mike Driscoll

@driscollis

4 Tweets Jan 28, 2023
#Python includes more than 200 modules as a part of its standard library.
Today we will look at the `atexit` module
#PythonStdLib 🐍πŸ”₯
πŸ§΅πŸ‘‡
The `atexit` module in #Python defines functions to register and unregister cleanup functions.
Read more about `atexit` in the docs πŸ“š here:
docs.python.org
The Python docs have several interesting examples of using the `atexit` module.
Here is a module that can initialize a counter from a file when it is imported and save the counter’s updated value automatically when the program terminates
Thanks for reading my short thread on #Python's amazing `atexit` module!
You should give `atexit` a try. It looks like a really handy module.
Follow me to learn more abut Python and its amazing modules
#PythonStdLib 🐍πŸ”₯

Loading suggestions...