Exit programs gracefully
Project description
pyterminate
Reliably run cleanup upon program termination.
Quickstart
import signal
import pyterminate
@pyterminate.register(signals=(signal.SIGINT, signal.SIGTERM))
def cleanup():
...
# or
def cleanup(a, b):
...
pyterminate.register(cleanup, args=(None, 42))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyterminate-0.0.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for pyterminate-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f431f3c1c198789a30caf26a6aac366c5ba37b9bbf78dad38c5b46d2623900 |
|
MD5 | 36fc152e9543e1208448e9f8439ea936 |
|
BLAKE2b-256 | de766283cfdd994bbd6e14c145cff73665688f8cdcbb9408ea46a63eb97bbe44 |