Handles keyboard interrupt silently and gracefully
Project description
shhhinterrupt
Gracefully and shhh... (silently) handles keyboard interrupts.
You can either pass a string to print, e.g. @handle_interrupt("Please come again.") or you can use the decorator without parentheses to use the default message @handle_interrupt.
Full example:
from shhhinterrupt import handle_interrupt
import time
@handle_interrupt("He walked away.")
def main():
print("What's your name?")
time.sleep(5)
print("Tony!")
if __name__ == "main":
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shhhinterrupt-0.1.0.tar.gz.
File metadata
- Download URL: shhhinterrupt-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ad07d91c7a5a2cfec4ebb7273bc7902828f9aa85f7728658042b30cec55f0c2
|
|
| MD5 |
cf3675a0bad5e34784a3861395fc9e81
|
|
| BLAKE2b-256 |
29d09b19a54acb004d188273fed51adfeba2e78516ef7a1c17442f690e2b2930
|
Provenance
The following attestation bundles were made for shhhinterrupt-0.1.0.tar.gz:
Publisher:
test_build_publish.yml on RobertDusk/py-shhhinterrupt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shhhinterrupt-0.1.0.tar.gz -
Subject digest:
8ad07d91c7a5a2cfec4ebb7273bc7902828f9aa85f7728658042b30cec55f0c2 - Sigstore transparency entry: 155646423
- Sigstore integration time:
-
Permalink:
RobertDusk/py-shhhinterrupt@9d3aabcb82f170e0d7fe66b21fe4dae2f6604e9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/RobertDusk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_build_publish.yml@9d3aabcb82f170e0d7fe66b21fe4dae2f6604e9c -
Trigger Event:
push
-
Statement type:
File details
Details for the file shhhinterrupt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shhhinterrupt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
461a8f57caab5d7f1f06e7c0b257c65c9c2285387908ff15da2c2688090a6853
|
|
| MD5 |
1fc049ad10b84beb846f4bccf67dbb35
|
|
| BLAKE2b-256 |
bb7a2328c1eb392c8334e7dd3ce4a9c7532579d27202f98d96e36b73a9c3d2dd
|
Provenance
The following attestation bundles were made for shhhinterrupt-0.1.0-py3-none-any.whl:
Publisher:
test_build_publish.yml on RobertDusk/py-shhhinterrupt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shhhinterrupt-0.1.0-py3-none-any.whl -
Subject digest:
461a8f57caab5d7f1f06e7c0b257c65c9c2285387908ff15da2c2688090a6853 - Sigstore transparency entry: 155646425
- Sigstore integration time:
-
Permalink:
RobertDusk/py-shhhinterrupt@9d3aabcb82f170e0d7fe66b21fe4dae2f6604e9c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/RobertDusk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test_build_publish.yml@9d3aabcb82f170e0d7fe66b21fe4dae2f6604e9c -
Trigger Event:
push
-
Statement type: