💾 Archived View for tris.fyi › pydoc › atexit captured on 2022-04-28 at 17:28:31. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-01-08)

➡️ Next capture (2023-01-29)

-=-=-=-=-=-=-

Back to module index

Go to module by name

atexit

allow programmer to define multiple exit functions to be executedupon normal program termination.

Two public functions, register and unregister, are defined.

Functions

register

register(...)

  register(func, *args, **kwargs) -> func

  Register a function to be executed upon normal program termination

      func - function to be called at exit
      args - optional arguments to pass to func
      kwargs - optional keyword arguments to pass to func

      func is returned to facilitate usage as a decorator.

unregister

unregister(...)

  unregister(func) -> None

  Unregister an exit function which was previously registered using
  atexit.register

      func - function to be unregistered