The pycups-notify library is an extension to the pycups one. It enables subscription to CUPS RSS notifications.
This library implements the Event notify pattern to match with the design description of the CUPS server.
Install
$> pip install pycups-notify
Usage
import time
import cups
from cups_notify import Subscriber
def on_event(event):
print(event)
# Create a CUPS connection
conn = cups.Connection()
# Create a new subscriber
sub = Subscriber(conn)
# Subscribe the callback to all CUPS events
sub.subscribe(on_event)
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
sub.stop()
A simple listener can be started by typing the following command line:
$> pycups-notify
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 pycups_notify-0.0.1-py2.py3-none-any.whl.
File metadata
- Download URL: pycups_notify-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf422e9895ef49256e3dcaf556a4297230eab76b9c74bcf552e12446d43c6f68
|
|
| MD5 |
05b248fe4b0d00fb9724735ea3458881
|
|
| BLAKE2b-256 |
a9715939e62853318b09f955fa817b967dade4c1bacb701a1ae20a20b838f062
|