Skip to main content

🚀 dontpanic

A very simple Python module to suppress KeyboardInterrupt traceback spam when pressing ^C.

Why?

By default, Python screams at you when you press ^C to interrupt a script. (Proper languages like Perl don't do this.)

This module catches KeyboardInterrupt signals and handles them gracefully.

Installation

pip install dontpanic

Usage

import dontpanic

print('Press control-C to interrupt this program')
while True:
    pass  # Press ^C to interrupt

... or with a custom message:

import dontpanic

dontpanic.set_message("Exiting...")

print('Press control-C to interrupt this program')
while True:
    pass  # Press ^C to interrupt

Don't Panic

Metadata

Release files for dontpanic 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dontpanic 0.1.0
File Size Uploaded Provenance Actions
dontpanic-0.1.0.tar.gz 2.3 kB Without provenance Details for dontpanic-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dontpanic 0.1.0
File Interpreter ABI Platform Actions
dontpanic-0.1.0-py3-none-any.whl Python 3 none any Details for dontpanic-0.1.0-py3-none-any.whl

Total release size: 4.6 kB

Release files / dontpanic-0.1.0.tar.gz

Download URL dontpanic-0.1.0.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ea540230b5b951f71c772b770cdf97470752b8346e2ce1bba93bbb06fd02345d
BLAKE2b-256 checksum
How to use checksums
5ba86edc6fe86e5e67c481339129a2897ed7bbf2bd7e10c4d7fed475fcfb0c34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / dontpanic-0.1.0-py3-none-any.whl

Download URL dontpanic-0.1.0-py3-none-any.whl
Size 2.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f58ee1ab31c0ae8b882b12345361ae99865ea6f561c9cf3cfd54f9cbaf22b8
BLAKE2b-256 checksum
How to use checksums
ae6f20941809425d5e573cf7c27c50718e395183f92896729689a977c9f46618
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for dontpanic 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page