summaryrefslogtreecommitdiff
path: root/urwid/curses_display.py
diff options
context:
space:
mode:
authorEevee (Alex Munroe) <eevee.git@veekun.com>2014-06-03 17:06:44 -0700
committerEevee (Alex Munroe) <eevee.git@veekun.com>2014-06-03 17:06:44 -0700
commitf1179521fa69e73f5b4e8cf2b31294546b4bd747 (patch)
tree33edb6e67a72e7da37d4960cc9f8ada2a005b83e /urwid/curses_display.py
parent3c7d8a32484c52dc0767dc8bde19d4fcb8349dd4 (diff)
downloadurwid-f1179521fa69e73f5b4e8cf2b31294546b4bd747.tar.gz
Put run_wrapper in the base class; make BaseScreen.start() a contextmanager.
Diffstat (limited to 'urwid/curses_display.py')
-rwxr-xr-xurwid/curses_display.py15
1 files changed, 1 insertions, 14 deletions
diff --git a/urwid/curses_display.py b/urwid/curses_display.py
index 758d621..0a6155a 100755
--- a/urwid/curses_display.py
+++ b/urwid/curses_display.py
@@ -130,7 +130,7 @@ class Screen(BaseScreen, RealTerminal):
if not self._signal_keys_set:
self._old_signal_keys = self.tty_signal_keys()
- super(Screen, self).start()
+ return super(Screen, self).start()
def stop(self):
@@ -152,19 +152,6 @@ class Screen(BaseScreen, RealTerminal):
super(Screen, self).stop()
- def run_wrapper(self,fn):
- """Call fn in fullscreen mode. Return to normal on exit.
-
- This function should be called to wrap your main program loop.
- Exception tracebacks will be displayed in normal mode.
- """
-
- try:
- self.start()
- return fn()
- finally:
- self.stop()
-
def _setup_colour_pairs(self):
"""
Initialize all 63 color pairs based on the term: