$ 0 0 The atexit module provides an interface to register functions to be called when a program closes down normally. Read more… This post is part of the Python Module of the Week series for Python 3. See PyMOTW.com for more articles from the series.