pyvguicom 1.1.2__tar.gz → 1.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyvguicom might be problematic. Click here for more details.

Files changed (49) hide show
  1. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/PKG-INFO +1 -1
  2. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgentry.py +33 -0
  3. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pggui.py +1 -1
  4. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgtests.py +77 -2
  5. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testentry.py +33 -3
  6. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testtests.py +51 -1
  7. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom.egg-info/PKG-INFO +1 -1
  8. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/README.md +0 -0
  9. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/__init__.py +0 -0
  10. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/browsewin.py +0 -0
  11. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/custwidg.py +0 -0
  12. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/__index__.py +0 -0
  13. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/browsewin.html +0 -0
  14. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/htmledit.html +0 -0
  15. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgbox.html +0 -0
  16. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgbutt.html +0 -0
  17. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgentry.html +0 -0
  18. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pggui.html +0 -0
  19. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgsel.html +0 -0
  20. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgsimp.html +0 -0
  21. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgtextview.html +0 -0
  22. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgutils.html +0 -0
  23. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/pgwkit.html +0 -0
  24. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/docs/sutil.html +0 -0
  25. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/htmledit.py +0 -0
  26. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgbox.py +0 -0
  27. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgbutt.py +0 -0
  28. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgsel.py +0 -0
  29. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgsimp.py +0 -0
  30. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgtextview.py +0 -0
  31. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgutils.py +0 -0
  32. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/pgwkit.py +0 -0
  33. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/plug.py +0 -0
  34. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testbutt.py +0 -0
  35. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testcust.py +0 -0
  36. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testgui.py +0 -0
  37. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testicons.py +0 -0
  38. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testlettsel.py +0 -0
  39. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testmsgs.py +0 -0
  40. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testnums.py +0 -0
  41. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testroot.py +0 -0
  42. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testsimple.py +0 -0
  43. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testtextv.py +0 -0
  44. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom/testutils.py +0 -0
  45. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom.egg-info/SOURCES.txt +0 -0
  46. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom.egg-info/dependency_links.txt +0 -0
  47. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/pyvguicom.egg-info/top_level.txt +0 -0
  48. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/setup.cfg +0 -0
  49. {pyvguicom-1.1.2 → pyvguicom-1.3.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyvguicom
3
- Version: 1.1.2
3
+ Version: 1.3.0
4
4
  Summary: High power secure server GUI utility helpers.
5
5
  Home-page: https://github.com/pglen/pyguicom.git
6
6
  Author: Peter Glen
@@ -160,6 +160,39 @@ def textviewpair(arr, vbox, labtext, labname, tip, defval=None, expand=False):
160
160
  vbox.pack_start(hbox2, True, True, 0)
161
161
  return lab2
162
162
 
163
+ def gridhexa(gridxx, left, top, entry1, entry2, butt = None, butt2 = None):
164
+
165
+ lab1 = Gtk.Label.new_with_mnemonic(entry1[0] + " ")
166
+ lab1.set_alignment(1, 0)
167
+ lab1.set_tooltip_text(entry1[2])
168
+ gridxx.attach(lab1, left, top, 1, 1)
169
+
170
+ headx = Entryx();
171
+ lab1.set_mnemonic_widget(headx)
172
+ headx.set_width_chars(20)
173
+ if entry1[3] != None:
174
+ headx.set_text(entry1[3])
175
+ gridxx.attach(headx, left+1, top, 1, 1)
176
+
177
+ if butt:
178
+ gridxx.attach(butt, left+2, top, 1, 1)
179
+
180
+ lab2 = Gtk.Label.new_with_mnemonic(" " + entry2[0] + " ")
181
+ lab2.set_alignment(1, 0)
182
+ lab2.set_tooltip_text(entry2[2])
183
+ gridxx.attach(lab2, left+3, top, 1, 1)
184
+
185
+ headx2 = Entryx();
186
+ lab2.set_mnemonic_widget(headx2)
187
+
188
+ headx2.set_width_chars(20)
189
+ if entry2[3] != None:
190
+ headx2.set_text(entry2[3])
191
+ gridxx.attach(headx2, left+4, top, 1, 1)
192
+ if butt2:
193
+ gridxx.attach(butt2, left+5, top, 1, 1)
194
+ return headx, headx2
195
+
163
196
  def gridquad(gridx, left, top, entry1, entry2, butt = None):
164
197
  lab1 = Gtk.Label.new_with_mnemonic(entry1[0] + " ")
165
198
  lab1.set_alignment(1, 0)
@@ -24,7 +24,7 @@ import pgsimp
24
24
 
25
25
  IDXERR = "Index is larger than the available number of controls."
26
26
 
27
- VERSION = "1.1.2"
27
+ VERSION = "1.3.0"
28
28
 
29
29
  gui_testmode = 0
30
30
 
@@ -41,10 +41,27 @@ def randascii(lenx):
41
41
  strx += " "
42
42
  return strx
43
43
 
44
+ desig = ( "St", "RD", "Valley", "Terrace", "Ave", "Hw",
45
+ "Rd", "Lane", "Alley", "Bvld", "Boulevard",
46
+ "Crest", "Ridge", "Hill", )
47
+
48
+ def simaddr(lenx):
49
+
50
+ strx = randnumstr(random.randint(2, 5)) + ". "
51
+ strx += randupper(1)
52
+ strx += randlower(random.randint(4, lenx // 2)) + " "
53
+
54
+ strx += randupper(1)
55
+ strx += randlower(random.randint(4, lenx // 2)) + " "
56
+ strx += desig[random.randint(0, len(desig)-1)] + "."
57
+
58
+ return strx
59
+
60
+
44
61
  def simname(lenx):
45
62
  strx = ""
46
63
  lenz = len(alllett)-1
47
- spidx = random.randint(0, lenx - 4)
64
+ spidx = random.randint(3, lenx - 4)
48
65
  ridx = random.randint(0, len(string.ascii_uppercase)-1)
49
66
  strx += string.ascii_uppercase[ridx]
50
67
  for aa in range(spidx):
@@ -80,6 +97,33 @@ def randate():
80
97
  # ------------------------------------------------------------------------
81
98
  # Get random str
82
99
 
100
+ def randnumstr(lenx):
101
+
102
+ strx = ""
103
+ for aa in range(lenx):
104
+ ridx = random.randint(0, len(string.digits)-1)
105
+ rr = string.digits[ridx]
106
+ strx += str(rr)
107
+
108
+ return strx
109
+
110
+ def randphone():
111
+
112
+ strx = "1+ " + randnumstr(2)
113
+ strx += " (" + randnumstr(3) + ") "
114
+ strx += randnumstr(3) + " "
115
+ strx += randnumstr(4)
116
+
117
+ return strx
118
+
119
+ def randemail():
120
+
121
+ strx = randlower(random.randint(3, 9)) + "@"
122
+ strx += randlower(random.randint(4, 12)) + "."
123
+ strx += randlower(random.randint(2, 3))
124
+
125
+ return strx
126
+
83
127
  def randstr(lenx):
84
128
 
85
129
  strx = ""
@@ -90,6 +134,17 @@ def randstr(lenx):
90
134
 
91
135
  return strx
92
136
 
137
+ def randstrrand(lenmin, lenmax):
138
+
139
+ lenx = random.randint(lenmin, lenmax)
140
+ strx = ""
141
+ for aa in range(lenx):
142
+ ridx = random.randint(0, len(allstr)-1)
143
+ rr = allstr[ridx]
144
+ strx += str(rr)
145
+
146
+ return strx
147
+
93
148
  def randasc(lenx):
94
149
 
95
150
  strx = ""
@@ -110,13 +165,33 @@ def randlett(lenx):
110
165
 
111
166
  return strx
112
167
 
168
+ def randlower(lenx):
169
+
170
+ strx = ""
171
+ for aa in range(lenx):
172
+ ridx = random.randint(0, len(string.ascii_lowercase)-1)
173
+ rr = string.ascii_lowercase[ridx]
174
+ strx += str(rr)
175
+
176
+ return strx
177
+
178
+ def randupper(lenx):
179
+
180
+ strx = ""
181
+ for aa in range(lenx):
182
+ ridx = random.randint(0, len(string.ascii_uppercase)-1)
183
+ rr = string.ascii_uppercase[ridx]
184
+ strx += str(rr)
185
+
186
+ return strx
187
+
188
+
113
189
  # ------------------------------------------------------------------------
114
190
  # Random colors
115
191
 
116
192
  def randcol():
117
193
  return random.randint(0, 255)
118
194
 
119
-
120
195
  def randcolstr(start = 0, endd = 255):
121
196
  rr = random.randint(start, endd)
122
197
  gg = random.randint(start, endd)
@@ -33,20 +33,50 @@ class pgtestwin(testwin):
33
33
 
34
34
  testwin.__init__(self)
35
35
 
36
+ vbox = Gtk.VBox()
37
+
38
+ hbox3x = Gtk.HBox()
39
+ hbox3x.pack_start(Gtk.Label(label=" "), 1, 1, 2)
40
+ vbox.pack_start(hbox3x, 0, 0, 2)
41
+
42
+ gridx2 = Gtk.Grid()
43
+ gridx2.set_column_spacing(6)
44
+ gridx2.set_row_spacing(6)
45
+
46
+ rowcnt = 0
47
+ butt1 = Gtk.Button.new_with_mnemonic("Butt1 Here")
48
+ butt2 = Gtk.Button.new_with_mnemonic("Butt2 Here")
49
+ tp1 =("Next Search: ", "name", "Enter full name (TAB to advance)", None)
50
+ tp2 = ("Search: ", "dob", "Date of birth, YYYY/MM/DD", None)
51
+ lab1, lab2 = pgentry.gridhexa(gridx2, 0, rowcnt, tp1, tp2, butt1, butt2)
52
+ rowcnt += 1
53
+
54
+ buttx1 = Gtk.Button.new_with_mnemonic("Butt1 again Here")
55
+ buttx2 = Gtk.Button.new_with_mnemonic("Butt2 longer Here")
56
+ tp1x =("ID Search: ", "name", "Enter full name (TAB to advance)", None)
57
+ tp2x = ("Anteffect Search: ", "dob", "Date of birth, YYYY/MM/DD", None)
58
+ lab1, lab2 = pgentry.gridhexa(gridx2, 0, rowcnt, tp1x, tp2x, buttx1, buttx2)
59
+ rowcnt += 1
60
+
61
+ hbox2x = Gtk.HBox()
62
+ hbox2x.pack_start(gridx2, 1, 1, 2)
63
+ vbox.pack_start(hbox2x, 0, 0, 2)
64
+
65
+ hbox3x = Gtk.HBox()
66
+ hbox3x.pack_start(Gtk.Label(label=" "), 1, 1, 2)
67
+ vbox.pack_start(hbox3x, 0, 0, 2)
36
68
 
37
69
  gridx = Gtk.Grid()
38
70
  gridx.set_column_spacing(6)
39
71
  gridx.set_row_spacing(6)
40
72
 
41
- vbox = Gtk.VBox()
42
-
43
73
  rowcnt = 0
44
74
  self.dat_dict = {}
45
75
  sumx = Gtk.HBox()
46
76
  buttx2 = Gtk.Button.new_with_mnemonic("Sele_ct Date")
47
77
  tp1 =("Full Nam_e: ", "name", "Enter full name (TAB to advance)", None)
48
78
  tp2 = ("Date o_f birth: ", "dob", "Date of birth, YYYY/MM/DD", None)
49
- lab1, lab2 = pgentry.gridquad(gridx, rowcnt, 0, tp1, tp2, buttx2)
79
+ lab1, lab2 = pgentry.gridquad(gridx, 0, rowcnt, tp1, tp2, buttx2)
50
80
  #buttx2.connect("clicked", self.pressed_dob, lab2)
51
81
  self.dat_dict['name'] = lab1
52
82
  self.dat_dict['dob'] = lab2
@@ -16,6 +16,16 @@ from gi.repository import PangoCairo
16
16
 
17
17
  import pgtests
18
18
 
19
+ def test_randstr(arg2, arg3):
20
+ rrr = pgtests.randstr(12)
21
+ print(rrr)
22
+ arg3.set_text(rrr)
23
+
24
+ def test_randstrrand(arg2, arg3):
25
+ rrr = pgtests.randstrrand(6, 18)
26
+ print(rrr)
27
+ arg3.set_text(rrr)
28
+
19
29
  def test_rand(arg2, arg3):
20
30
  rrr = pgtests.randascii(12)
21
31
  print(rrr)
@@ -27,7 +37,7 @@ def test_rand2(arg2, arg3):
27
37
  arg3.set_text(rrr)
28
38
 
29
39
  def test_rand3(arg2, arg3):
30
- rrr = pgtests.simname(12)
40
+ rrr = pgtests.simname(random.randint(9, 18))
31
41
  print(rrr)
32
42
  arg3.set_text(rrr)
33
43
 
@@ -36,6 +46,26 @@ def test_rand4(arg2, arg3):
36
46
  print(rrr)
37
47
  arg3.set_text(rrr)
38
48
 
49
+ def test_rand5(arg2, arg3):
50
+ rrr = pgtests.randnumstr(8)
51
+ print(rrr)
52
+ arg3.set_text(rrr)
53
+
54
+ def test_rand6(arg2, arg3):
55
+ rrr = pgtests.randphone()
56
+ print(rrr)
57
+ arg3.set_text(rrr)
58
+
59
+ def test_rand7(arg2, arg3):
60
+ rrr = pgtests.randemail()
61
+ print(rrr)
62
+ arg3.set_text(rrr)
63
+
64
+ def test_rand8(arg2, arg3):
65
+ rrr = pgtests.simaddr(12)
66
+ print(rrr)
67
+ arg3.set_text(rrr)
68
+
39
69
  if __name__ == "__main__":
40
70
 
41
71
  w = Gtk.Window()
@@ -49,6 +79,14 @@ if __name__ == "__main__":
49
79
  hbox.pack_start(lab1, 1, 1, 0)
50
80
  vbox.pack_start(hbox, 1, 1, 0)
51
81
 
82
+ butt = Gtk.Button.new_with_mnemonic("Test Rand Str")
83
+ butt.connect("clicked", test_randstr, lab1)
84
+ vbox.pack_start(butt, 0, 0, 2)
85
+
86
+ butt = Gtk.Button.new_with_mnemonic("Test Rand Rand")
87
+ butt.connect("clicked", test_randstrrand, lab1)
88
+ vbox.pack_start(butt, 0, 0, 2)
89
+
52
90
  butt = Gtk.Button.new_with_mnemonic("Test Rand")
53
91
  butt.connect("clicked", test_rand, lab1)
54
92
  vbox.pack_start(butt, 0, 0, 2)
@@ -65,6 +103,18 @@ if __name__ == "__main__":
65
103
  butt.connect("clicked", test_rand4, lab1)
66
104
  vbox.pack_start(butt, 0, 0, 2)
67
105
 
106
+ butt = Gtk.Button.new_with_mnemonic("Test randnumstr")
107
+ butt.connect("clicked", test_rand5, lab1)
108
+ vbox.pack_start(butt, 0, 0, 2)
109
+
110
+ butt = Gtk.Button.new_with_mnemonic("Test randemail")
111
+ butt.connect("clicked", test_rand7, lab1)
112
+ vbox.pack_start(butt, 0, 0, 2)
113
+
114
+ butt = Gtk.Button.new_with_mnemonic("Test simaddr")
115
+ butt.connect("clicked", test_rand8, lab1)
116
+ vbox.pack_start(butt, 0, 0, 2)
117
+
68
118
  butt = Gtk.Button.new_with_mnemonic("E_xit")
69
119
  butt.connect("clicked", Gtk.main_quit)
70
120
  vbox.pack_start(butt, 0, 0, 2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyvguicom
3
- Version: 1.1.2
3
+ Version: 1.3.0
4
4
  Summary: High power secure server GUI utility helpers.
5
5
  Home-page: https://github.com/pglen/pyguicom.git
6
6
  Author: Peter Glen
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes