Skip to content

Commit

Permalink
Minor doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anxuae committed Oct 29, 2019
1 parent 7487cc9 commit 0609908
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Usage
import cups
from cups_notify import Subscriber
def on_event(event):
print(event)
def on_event(evt):
print(evt)
# Create a CUPS connection
conn = cups.Connection()
Expand All @@ -54,10 +54,10 @@ It is possible to define a list of events on which the callback is binded:
.. code-block:: python
import cups
from cups_notify import Subscriber, events
from cups_notify import Subscriber, event
def my_callback(event):
print(event)
def my_callback(evt):
print(evt.title, evt.description)
# Create a new subscriber
sub = Subscriber(cups.Connection())
Expand All @@ -67,9 +67,9 @@ It is possible to define a list of events on which the callback is binded:
event.CUPS_EVT_JOB_COMPLETED,
event.CUPS_EVT_JOB_STOPPED])
If the CUPS server is not running on the same computer as the subscriber application,
the local IP address (same network than the CUPS server) have to be provided to the
subscriber class:
If the CUPS server is not running on the same computer as the subscriber application
one, the local IP address (same network than the CUPS server) have to be provided to
the subscriber class:

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions cups_notify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-

"""Notification system for the pycups libarary."""
"""Notification system for the pycups library."""

import logging

LOGGER = logging.getLogger(__name__)

__version__ = "0.0.1"
__version__ = "0.0.2"
4 changes: 1 addition & 3 deletions cups_notify/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ def main():
def on_event(evt):
print(evt)

conn = cups.Connection()

sub = Subscriber(conn)
sub = Subscriber(cups.Connection())
sub.subscribe(on_event)

try:
Expand Down

0 comments on commit 0609908

Please sign in to comment.