Coding style.
Moved urwid_screen from terminal.py to vigil.py, because it didn't really belong in terminal.py.
This commit is contained in:
parent
fbf02da50f
commit
033dcf5e9a
2 changed files with 16 additions and 17 deletions
14
terminal.py
14
terminal.py
|
|
@ -8,9 +8,6 @@ import curses
|
|||
import os
|
||||
import sys
|
||||
|
||||
import urwid
|
||||
import urwid.raw_display
|
||||
|
||||
|
||||
curses.setupterm(os.environ.get("TERM", "unknown"), sys.stdout.fileno())
|
||||
|
||||
|
|
@ -96,14 +93,3 @@ def console_title(title):
|
|||
yield
|
||||
finally:
|
||||
sys.stdout.write(restore)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def urwid_screen():
|
||||
screen = urwid.raw_display.Screen()
|
||||
screen.set_mouse_tracking(True)
|
||||
screen.start()
|
||||
try:
|
||||
yield screen
|
||||
finally:
|
||||
screen.stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue