27 lines
1.0 KiB
Plaintext
27 lines
1.0 KiB
Plaintext
From: jwpolley at collins.rockwell.com (Jonathan Polley)
|
|
Date: Fri, 23 Apr 1999 10:36:00 -0500
|
|
Subject: Proposed Change for sys.exitfunc for version 1.6
|
|
Message-ID: <37209360.2FB8E145@collins.rockwell.com>
|
|
X-UID: 1413
|
|
|
|
I would like to propose adding a function to the module 'sys' that would
|
|
change (slightly) the behavior of sys.exitfunc. I would like to add a
|
|
method that performs the same function as UNIX's 'atexit ()' function.
|
|
The reason is that I have some modules that would like to do some
|
|
cleanup when python terminates, but I don't want to have to add the code
|
|
required for them to remember the previous value of sys.exitfunc so they
|
|
can call that function (if present). A method sys.atexit () would work
|
|
nicely. It would allow me to add a series of exit functions and be
|
|
guaranteed that they would all be called at the termination of python
|
|
(so I can close files, purge queues, close sockets, etc.). Does anyone
|
|
else think this would be a good idea???
|
|
|
|
|
|
Jonathan Polley
|
|
jwpolley at collins.rockwell.com
|
|
|
|
|
|
|
|
|
|
|