atexit
Stdlib — MiscPython 2.0+Intermediate
Register cleanup functions for interpreter shutdown
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
- Dependencies
- None — Python Standard Library
- Install
Included with Python
Learn by Difficulty
Quick Example
python
import atexit print(f"Module: atexit") print(f"Contents: {dir(atexit)[:10]}")
The atexit module is part of Python's standard library. Register cleanup functions for interpreter shutdown.
Try in PlaygroundTags
stdlibutility