summaryrefslogtreecommitdiff
path: root/wasp/apps/pager.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-05-14 21:29:35 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-05-14 21:29:35 (GMT)
commitb8efcd30537f04269738e6969376129f4ed88315 (patch)
treecf0f4f2d12603ca85bc5f0b664bcd4883b85f436 /wasp/apps/pager.py
parentf07fb6d22a7124f945a29c2895cec87a69e08b37 (diff)
wasp: Even more docstrings
Diffstat (limited to 'wasp/apps/pager.py')
-rw-r--r--wasp/apps/pager.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/wasp/apps/pager.py b/wasp/apps/pager.py
index 7da8f5a..18322d2 100644
--- a/wasp/apps/pager.py
+++ b/wasp/apps/pager.py
@@ -1,20 +1,22 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
# Copyright (C) 2020 Daniel Thompson
+"""Pager applications
+~~~~~~~~~~~~~~~~~~~~~
+
+The pager is used to present text based information to the user. It is
+primarily intended for notifications but is also used to provide debugging
+information when applications crash.
+"""
+
import wasp
import icons
import io
import sys
-
class PagerApp():
- """Show long text in a pager.
-
- This is used to present text based information to the user. It is primarily
- intended for notifications but is also used to provide debugging
- information when applications crash.
- """
+ """Show a long text message in a pager."""
NAME = 'Pager'
ICON = icons.app
@@ -31,10 +33,12 @@ class PagerApp():
self._draw()
def background(self):
+ """De-activate the application."""
del self._chunks
del self._numpages
def swipe(self, event):
+ """Swipe to page up/down."""
mute = wasp.watch.display.mute
if event[0] == wasp.EventType.UP:
@@ -114,6 +118,5 @@ class CrashApp():
wasp.watch.display.invert(True)
def swipe(self, event):
- """Show the exception message in a pager.
- """
+ """Show the exception message in a pager."""
wasp.system.switch(PagerApp(self._msg))