forked from npcole/npyscreen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTESTING-Pager.py
More file actions
executable file
·28 lines (21 loc) · 834 Bytes
/
Copy pathTESTING-Pager.py
File metadata and controls
executable file
·28 lines (21 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env python
import npyscreen
class EditorFormExample(npyscreen.FormMutt):
MAIN_WIDGET_CLASS = npyscreen.Pager
class TestApp(npyscreen.NPSApp):
def main(self):
F = EditorFormExample()
F.wStatus1.value = "Status Line "
F.wStatus2.value = "Second Status Line "
F.wMain.editable = False
F.wMain.autowrap = True
F.wMain.center = True
#F.wMain.buffer([str(r) for r in range(100)], scroll_if_editing=True)
#with open("/Users/nicholas/Downloads/pg2600.txt", 'r') as war_and_peace:
with open("setup.py", 'r') as war_and_peace:
F.wMain.values = war_and_peace.readlines()[:50]
#F.wMain.values = war_and_peace.readlines()
F.edit()
if __name__ == "__main__":
App = TestApp()
App.run()