listen
Simple but powerful signal handling to process OS signals in python
##Example Usage:
import listen
import subprocess
Instanciate SignalHandler
sig_hand = listen.SignalHandler()
Start external process
external_process = subprocess.Popen(['sh', '-c', 'sleep 30'])
Register some signal handlers to kill external process on SIGINT (ctrl-c)
kill_event = sig_hand.reg_on_status(external_process.kill)
Wait for external process
external_process.wait()
Press ctrl-c to send SIGINT or alternatively use the following to unregister the event
sig_hand.del_status_event(kill_event)
For a more detailed example including interaction with bash please see the tests/example.py and tests/external_process.bash
Metadata
Release files for listen 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| listen-0.2.1.tar.gz | 6.5 kB | Without provenance | Details for listen-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| listen-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for listen-0.2.1-py3-none-any.whl |
Total release size: 15.8 kB
Release files / listen-0.2.1.tar.gz
| Download URL | listen-0.2.1.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d28703b342fb8847de64cac473abba91b17fc4430f1c976ba381bb9bedfe2ee
|
|
BLAKE2b-256 checksum How to use checksums |
3c5c1218bff42d76a8c7233f6282ff1e84282175a3adc0649aa504ee9a89b1ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
|
Release files / listen-0.2.1-py3-none-any.whl
| Download URL | listen-0.2.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87eecc0aff33ff54d5542cd8972dbaf21baeb9c06d3ddbb2a2c7290c85e3e69e
|
|
BLAKE2b-256 checksum How to use checksums |
51f73dc4278887bc260ce17943a9cc0ffd2694d58f402c686baee40eac094f50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9
|
Security for listen 0.2.1
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.