1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/python3
import urwid as ui
palette=[
('main_footer', 'white', 'dark gray'),
('main_header', 'white', 'dark cyan'),
('main_background', 'white', 'dark blue'),
]
main_header = ui.AttrMap(ui.Text(('main_header', 'Dyson Installer'), align='center'), 'main_header')
main_footer = ui.AttrMap(ui.Text(('main_footer', 'F10 - Exit'), align='left'), 'main_footer')
main_frame = ui.Frame(ui.AttrMap(ui.SolidFill(' '), 'main_background'), header=main_header, footer=main_footer)
def unhandled_input(key):
if key == 'f10':
raise ui.ExitMainLoop()
loop = ui.MainLoop(main_frame, palette, unhandled_input=unhandled_input)
loop.run()
|