This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple but powerful signal handling to process OS signals in python

Project Description

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

Release History

Release History

This version
History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
listen-0.1.7.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Sep 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting