Skip to content

Commit 33e6fc0

Browse files
committed
Removed unnecessary files from the archive.
1 parent 1ef7f2a commit 33e6fc0

File tree

137 files changed

+202
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+202
-182
lines changed

.hgignore

+4
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ syntax: glob
22

33
*.pyc
44
example-addressbook.db
5+
*.gz
6+
*.asc
7+
*.gpg
8+
*.sig

TESTING-Progress.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import npyscreen
2+
3+
4+
class ProcessBar(npyscreen.Slider):
5+
def __init__(self, *args, **keywords):
6+
super(ProcessBar, self).__init__(*args, **keywords)
7+
self.editable = False
8+
9+
class ProcessBarBox(npyscreen.BoxTitle):
10+
_contained_widget = ProcessBar
11+
12+
13+
14+
class TestApp(npyscreen.NPSApp):
15+
def main(self):
16+
F = npyscreen.Form(name = "Welcome to Npyscreen",)
17+
s = F.add(ProcessBarBox, max_height=3, out_of=12, value=5, name = "Text:")
18+
19+
#s.editable=False
20+
21+
22+
# This lets the user play with the Form.
23+
F.edit()
24+
25+
26+
if __name__ == "__main__":
27+
App = TestApp()
28+
App.run()

User_Submitted.py

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/usr/bin/env python
2+
# encoding: utf-8
3+
4+
import npyscreen
5+
import threading
6+
import time
7+
#npyscreen.disableColor()
8+
class TestApp(npyscreen.NPSApp):
9+
def main(self):
10+
def _generateTestData(pager):
11+
i = 0
12+
while i <= 6:
13+
time.sleep(1)
14+
pager.values.append("Test string!!")
15+
pager.update()
16+
i = i + 1
17+
if i == 3:
18+
npyscreen.notify_ok_cancel("procced?")
19+
20+
# These lines create the form and populate it with widgets.
21+
# A fairly complex screen in only 8 or so lines of code - a line for each control.
22+
F = npyscreen.FormMultiPageActionWithMenus(name = "Welcome to Npyscreen",)
23+
t = F.add(npyscreen.TitleText, name = "Text:",)
24+
fn = F.add(npyscreen.TitleFilename, name = "Filename:")
25+
dt = F.add(npyscreen.TitleDateCombo, name = "Date:")
26+
s = F.add(npyscreen.TitleSlider, out_of=12, name = "Slider")
27+
p = F.add(npyscreen.Pager, name = "Test DATA")
28+
29+
mythread = threading.Thread(target=_generateTestData, args=(p,))
30+
mythread.start()
31+
32+
# The new page is created here.
33+
new_page = F.add_page()
34+
35+
ml= F.add(npyscreen.MultiLineEdit,
36+
value = """try typing here!\nMutiline text, press ^R to reformat.\n""",
37+
max_height=5,)
38+
ms= F.add(npyscreen.TitleSelectOne, max_height=4, value = [1,], name="Pick One",
39+
values = ["Option1","Option2","Option3"], scroll_exit=True)
40+
ms2= F.add(npyscreen.TitleMultiSelect, max_height =-2, value = [1,], name="Pick Several",
41+
values = ["Option1","Option2","Option3"], scroll_exit=True)
42+
43+
F.switch_page(0)
44+
45+
def on_ok():
46+
npyscreen.notify_confirm("OK Button Pressed!")
47+
F.on_ok = on_ok
48+
# This lets the user play with the Form.
49+
F.edit()
50+
51+
52+
if __name__ == "__main__":
53+
App = TestApp()
54+
App.run()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import curses
2+
from . import wgmultilinetree
3+
4+
class TreeLineSelectable(wgmultilinetree.TreeLine):
5+
# NB - as print is currently defined, it is assumed that these will
6+
# NOT contain multi-width characters, and that len() will correctly
7+
# give an indication of the correct offset
8+
CAN_SELECT = '[ ]'
9+
CAN_SELECT_SELECTED = '[*]'
10+
CANNOT_SELECT = ' '
11+
CANNOT_SELECT_SELECTED = ' * '
12+
13+
def _print_select_controls(self):
14+
SELECT_DISPLAY = None
15+
16+
if self._tree_real_value.selectable:
17+
if self.value.selected:
18+
SELECT_DISPLAY = self.CAN_SELECT_SELECTED
19+
else:
20+
SELECT_DISPLAY = self.CAN_SELECT
21+
else:
22+
if self.value.selected:
23+
SELECT_DISPLAY = self.CANNOT_SELECT_SELECTED
24+
else:
25+
SELECT_DISPLAY = self.CANNOT_SELECT
26+
27+
28+
if self.do_colors():
29+
attribute_list = self.parent.theme_manager.findPair(self, 'CONTROL')
30+
else:
31+
attribute_list = curses.A_NORMAL
32+
33+
34+
#python2 compatibility
35+
if isinstance(SELECT_DISPLAY, bytes):
36+
SELECT_DISPLAY = SELECT_DISPLAY.decode()
37+
38+
39+
40+
self.add_line(self.rely,
41+
self.left_margin+self.relx,
42+
SELECT_DISPLAY,
43+
self.make_attributes_list(SELECT_DISPLAY, attribute_list),
44+
self.width-self.left_margin,
45+
)
46+
47+
return len(SELECT_DISPLAY)
48+
49+
50+
def _print(self, left_margin=0):
51+
if not hasattr(self._tree_real_value, 'selected'):
52+
return None
53+
self.left_margin = left_margin
54+
self.parent.curses_pad.bkgdset(' ',curses.A_NORMAL)
55+
self.left_margin += self._print_tree(self.relx)
56+
57+
self.left_margin += self._print_select_controls() + 1
58+
59+
60+
if self.highlight:
61+
self.parent.curses_pad.bkgdset(' ',curses.A_STANDOUT)
62+
super(wgmultilinetree.TreeLine, self)._print()
63+
64+
65+
class TreeLineSelectableAnnotated(TreeLineSelectable, wgmultilinetree.TreeLineAnnotated):
66+
def _print(self, left_margin=0):
67+
if not hasattr(self._tree_real_value, 'selected'):
68+
return None
69+
self.left_margin = left_margin
70+
self.parent.curses_pad.bkgdset(' ',curses.A_NORMAL)
71+
self.left_margin += self._print_tree(self.relx)
72+
self.left_margin += self._print_select_controls() + 1
73+
if self.do_colors():
74+
self.left_margin += self.annotationColor(self.left_margin+self.relx)
75+
else:
76+
self.left_margin += self.annotationNoColor(self.left_margin+self.relx)
77+
if self.highlight:
78+
self.parent.curses_pad.bkgdset(' ',curses.A_STANDOUT)
79+
super(wgmultilinetree.TreeLine, self)._print()
80+
81+
82+
83+
class MLTreeMultiSelect(wgmultilinetree.MLTree):
84+
_contained_widgets = TreeLineSelectable
85+
def __init__(self, screen, select_cascades=True, *args, **keywords):
86+
super(MLTreeMultiSelect, self).__init__(screen, *args, **keywords)
87+
self.select_cascades = select_cascades
88+
89+
def h_select(self, ch):
90+
vl = self.values[self.cursor_line]
91+
vl_to_set = not vl.selected
92+
if self.select_cascades:
93+
for v in vl.walkTree(onlyExpanded=False, ignoreRoot=False):
94+
if v.selectable:
95+
v.selected = vl_to_set
96+
else:
97+
vl.selected = vl_to_set
98+
if self.select_exit:
99+
self.editing = False
100+
self.how_exited = True
101+
self.display()
102+
103+
def get_selected_objects(self, return_node=True):
104+
for v in self._myFullValues.walkTree(onlyExpanded=False, ignoreRoot=False):
105+
if v.selected:
106+
if return_node:
107+
yield v
108+
else:
109+
yield v.getContent()
110+
111+
class MLTreeMultiSelectAnnotated(MLTreeMultiSelect):
112+
_contained_widgets = TreeLineSelectableAnnotated
113+
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

dist/npyscreen-2.0pre1.tar.gz

-15.6 KB
Binary file not shown.

dist/npyscreen-2.0pre12.tar.gz

-22.4 KB
Binary file not shown.

dist/npyscreen-2.0pre13.tar.gz

-22.4 KB
Binary file not shown.

dist/npyscreen-2.0pre15.tar.gz

-24 KB
Binary file not shown.

dist/npyscreen-2.0pre18.tar.gz

-25.6 KB
Binary file not shown.

dist/npyscreen-2.0pre19.tar.gz

-28.2 KB
Binary file not shown.

dist/npyscreen-2.0pre2.tar.gz

-15.7 KB
Binary file not shown.

dist/npyscreen-2.0pre21.tar.gz

-30.9 KB
Binary file not shown.

dist/npyscreen-2.0pre22.tar.gz

-31.7 KB
Binary file not shown.

dist/npyscreen-2.0pre23.tar.gz

-30.5 KB
Binary file not shown.

dist/npyscreen-2.0pre25.tar.gz

-30.6 KB
Binary file not shown.

dist/npyscreen-2.0pre26.tar.gz

-30.6 KB
Binary file not shown.
-88.1 KB
Binary file not shown.

dist/npyscreen-2.0pre30.tar.gz

-85.9 KB
Binary file not shown.

dist/npyscreen-2.0pre30.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre30.tar.gz.gpg

-86.2 KB
Binary file not shown.

dist/npyscreen-2.0pre31.tar.gz

-55.1 KB
Binary file not shown.

dist/npyscreen-2.0pre31.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre33.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre34.tar.gz

-56 KB
Binary file not shown.

dist/npyscreen-2.0pre34.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre35.tar.gz

-59.6 KB
Binary file not shown.

dist/npyscreen-2.0pre35.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre36.tar.gz

-64.5 KB
Binary file not shown.

dist/npyscreen-2.0pre39.tar.gz

-70.1 KB
Binary file not shown.

dist/npyscreen-2.0pre39.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre4.tar.gz

-18.4 KB
Binary file not shown.

dist/npyscreen-2.0pre40.tar.gz

-70.5 KB
Binary file not shown.

dist/npyscreen-2.0pre40.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre41.tar.gz

-70.5 KB
Binary file not shown.

dist/npyscreen-2.0pre41.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre42.tar.gz

-70.5 KB
Binary file not shown.

dist/npyscreen-2.0pre42.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre43.tar.gz

-70.5 KB
Binary file not shown.

dist/npyscreen-2.0pre43.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre44.tar.gz

-70.5 KB
Binary file not shown.

dist/npyscreen-2.0pre44.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre45.tar.gz

-70.9 KB
Binary file not shown.

dist/npyscreen-2.0pre45.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre46.tar.gz

-71 KB
Binary file not shown.

dist/npyscreen-2.0pre46.tar.gz.sig

-72 Bytes
Binary file not shown.
-123 KB
Binary file not shown.

dist/npyscreen-2.0pre47.tar.gz

-73.9 KB
Binary file not shown.

dist/npyscreen-2.0pre47.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre48.tar.gz

-75.2 KB
Binary file not shown.

dist/npyscreen-2.0pre48.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre48.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre48b.tar.gz

-75.2 KB
Binary file not shown.

dist/npyscreen-2.0pre48b.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre48c.tar.gz

-75.5 KB
Binary file not shown.

dist/npyscreen-2.0pre48c.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre49.tar.gz

-76.7 KB
Binary file not shown.

dist/npyscreen-2.0pre49.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre49.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre5.tar.gz

-18.4 KB
Binary file not shown.

dist/npyscreen-2.0pre50.tar.gz

-77.3 KB
Binary file not shown.

dist/npyscreen-2.0pre50.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre50a.tar.gz

-77.3 KB
Binary file not shown.

dist/npyscreen-2.0pre50a.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre50a.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre51.tar.gz

-77.6 KB
Binary file not shown.

dist/npyscreen-2.0pre51.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre51.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre52.tar.gz

-77.6 KB
Binary file not shown.

dist/npyscreen-2.0pre52.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre52.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre53.tar.gz

-78.2 KB
Binary file not shown.

dist/npyscreen-2.0pre53.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre53.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre54.tar.gz

-78.3 KB
Binary file not shown.

dist/npyscreen-2.0pre54.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre55.tar.gz

-78.4 KB
Binary file not shown.

dist/npyscreen-2.0pre55.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre55.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre56.tar.gz

-79.9 KB
Binary file not shown.

dist/npyscreen-2.0pre56.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre56.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre57.tar.gz

-81.1 KB
Binary file not shown.

dist/npyscreen-2.0pre57.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre57.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre58.tar.gz

-81.1 KB
Binary file not shown.

dist/npyscreen-2.0pre58.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre58.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre59.tar.gz

-83.1 KB
Binary file not shown.

dist/npyscreen-2.0pre59.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre59.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre6.tar.gz

-18.7 KB
Binary file not shown.

dist/npyscreen-2.0pre60.tar.gz

-83.5 KB
Binary file not shown.

dist/npyscreen-2.0pre60.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre60.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre61.tar.gz

-83.5 KB
Binary file not shown.

dist/npyscreen-2.0pre61.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre61.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre62.tar.gz

-83.6 KB
Binary file not shown.

dist/npyscreen-2.0pre62.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre62.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre63.tar.gz

-84.8 KB
Binary file not shown.

dist/npyscreen-2.0pre63.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre63.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre64.tar.gz

-85.5 KB
Binary file not shown.

dist/npyscreen-2.0pre64.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre64.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre65.tar.gz

-88 KB
Binary file not shown.

dist/npyscreen-2.0pre65.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre65.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre66.tar.gz

-88 KB
Binary file not shown.

dist/npyscreen-2.0pre66.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre66.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre67.tar.gz

-88 KB
Binary file not shown.

dist/npyscreen-2.0pre67.tar.gz.asc

-7
This file was deleted.

dist/npyscreen-2.0pre67.tar.gz.sig

-72 Bytes
Binary file not shown.

dist/npyscreen-2.0pre68.tar.gz

-88.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)