pyvguicom 1.2.0__tar.gz → 1.3.3__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.
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/PKG-INFO +1 -1
- pyvguicom-1.3.3/pyvguicom/comline.py +372 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgentry.py +33 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pggui.py +1 -1
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgsimp.py +4 -2
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgtests.py +66 -2
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgutils.py +9 -54
- pyvguicom-1.3.3/pyvguicom/testcline.py +62 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testentry.py +33 -3
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testsimple.py +9 -4
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testtests.py +33 -1
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom.egg-info/PKG-INFO +1 -1
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom.egg-info/SOURCES.txt +2 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/README.md +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/__init__.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/browsewin.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/custwidg.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/__index__.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/browsewin.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/htmledit.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgbox.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgbutt.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgentry.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pggui.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgsel.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgsimp.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgtextview.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgutils.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/pgwkit.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/docs/sutil.html +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/htmledit.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgbox.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgbutt.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgsel.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgtextview.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/pgwkit.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/plug.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testbutt.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testcust.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testgui.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testicons.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testlettsel.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testmsgs.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testnums.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testroot.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testtextv.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom/testutils.py +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom.egg-info/dependency_links.txt +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/pyvguicom.egg-info/top_level.txt +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/setup.cfg +0 -0
- {pyvguicom-1.2.0 → pyvguicom-1.3.3}/setup.py +0 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
import os, sys, string, time, traceback, getopt
|
|
4
|
+
import random, glob, warnings
|
|
5
|
+
|
|
6
|
+
VERSION = 1.0
|
|
7
|
+
|
|
8
|
+
#warnings.simplefilter("ignore")
|
|
9
|
+
#warnings.simplefilter("default")
|
|
10
|
+
#warnings.simplefilter("always")
|
|
11
|
+
|
|
12
|
+
# ------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
glargs = "" ; glhead = ""; glfoot = ""
|
|
15
|
+
|
|
16
|
+
glprog = os.path.basename(sys.argv[0])
|
|
17
|
+
gloptarr = []
|
|
18
|
+
glsoptarr = []
|
|
19
|
+
|
|
20
|
+
def pversion(ver):
|
|
21
|
+
|
|
22
|
+
print(os.path.basename(sys.argv[0]) + ":", "Version", ver)
|
|
23
|
+
|
|
24
|
+
#if sys.stdout.isatty():
|
|
25
|
+
# sys.exit(0)
|
|
26
|
+
|
|
27
|
+
def setargs(args):
|
|
28
|
+
global glargs
|
|
29
|
+
glargs = args
|
|
30
|
+
|
|
31
|
+
def setfoot(args):
|
|
32
|
+
global glfoot
|
|
33
|
+
glfoot = args
|
|
34
|
+
|
|
35
|
+
def sethead(args):
|
|
36
|
+
global glhead
|
|
37
|
+
glhead = args
|
|
38
|
+
|
|
39
|
+
def setprog(args):
|
|
40
|
+
global glprog
|
|
41
|
+
glprog = args
|
|
42
|
+
|
|
43
|
+
# ------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
def dupoptcheck(optarr):
|
|
46
|
+
optdup = {}
|
|
47
|
+
for bb in range(len(optarr)):
|
|
48
|
+
kkk = optarr[bb][0][0]
|
|
49
|
+
try:
|
|
50
|
+
optdup[kkk] += 1
|
|
51
|
+
except KeyError:
|
|
52
|
+
optdup[kkk] = 1
|
|
53
|
+
except:
|
|
54
|
+
print(sys.exc_info())
|
|
55
|
+
#print(optdup)
|
|
56
|
+
found = False
|
|
57
|
+
for cc in optdup.keys():
|
|
58
|
+
if optdup[cc] > 1:
|
|
59
|
+
#print("found dup", cc)
|
|
60
|
+
found = cc
|
|
61
|
+
return found
|
|
62
|
+
|
|
63
|
+
def phelp():
|
|
64
|
+
|
|
65
|
+
if glhead:
|
|
66
|
+
print("head", glhead)
|
|
67
|
+
print( "Usage: " + os.path.basename(sys.argv[0]), "[options]", glargs)
|
|
68
|
+
print( "options:")
|
|
69
|
+
|
|
70
|
+
for aa in optarr:
|
|
71
|
+
pad = " " * (9 - len(aa[1]))
|
|
72
|
+
print(" ", "-" + aa[0][0], " ", aa[1], pad, " - ", aa[4])
|
|
73
|
+
|
|
74
|
+
print()
|
|
75
|
+
if glfoot:
|
|
76
|
+
print("s", glfoot)
|
|
77
|
+
|
|
78
|
+
if sys.stdout.isatty():
|
|
79
|
+
sys.exit(0)
|
|
80
|
+
|
|
81
|
+
# ------------------------------------------------------------------------
|
|
82
|
+
# option [:], var_name, initial_val, function, helpstr
|
|
83
|
+
# Add colon ':' to option with argument.
|
|
84
|
+
|
|
85
|
+
optarr = [\
|
|
86
|
+
["d:", "pgdebug", 0, None, "Debug level 0-10" ], \
|
|
87
|
+
["p:", "port", 6666, None, "Listen on port"], \
|
|
88
|
+
["v", "verbose", 0, None, "Verbose. . More info on screen."], \
|
|
89
|
+
["q", "quiet", 0, None, "Quiet. Less info on screen."], \
|
|
90
|
+
["V", "version", None, pversion, "Print Version."], \
|
|
91
|
+
["h", "help", None, phelp, "Show Help. (this screen)"] \
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
# ------------------------------------------------------------------------
|
|
95
|
+
# Handle command line. Interpret optarray and decorate the class
|
|
96
|
+
# This allows a lot of sub utils to have a common set of options.
|
|
97
|
+
|
|
98
|
+
class Config:
|
|
99
|
+
|
|
100
|
+
#warnings.warn("Config Class obsolete, use ConfigLong", DeprecationWarning)
|
|
101
|
+
|
|
102
|
+
def __init__(self, optarr):
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
ddd = dupoptcheck(optarr)
|
|
106
|
+
if ddd:
|
|
107
|
+
raise ValueError("Duplicate options on comline.", ddd)
|
|
108
|
+
|
|
109
|
+
global glsoptarr
|
|
110
|
+
glsoptarr = optarr
|
|
111
|
+
|
|
112
|
+
self.optarr = optarr
|
|
113
|
+
self.verbose = False
|
|
114
|
+
self.debug = False
|
|
115
|
+
self.sess_key = ""
|
|
116
|
+
|
|
117
|
+
def comline(self, argv):
|
|
118
|
+
#warnings.warn("Config Class obsolete, use ConfigLong")
|
|
119
|
+
|
|
120
|
+
optletters = ""
|
|
121
|
+
for aa in self.optarr:
|
|
122
|
+
optletters += aa[0]
|
|
123
|
+
#print( optletters )
|
|
124
|
+
# Create defaults:
|
|
125
|
+
err = 0
|
|
126
|
+
for bb in range(len(self.optarr)):
|
|
127
|
+
if self.optarr[bb][1]:
|
|
128
|
+
# Coerse type
|
|
129
|
+
if type(self.optarr[bb][2]) == type(0):
|
|
130
|
+
self.__dict__[self.optarr[bb][1]] = int(self.optarr[bb][2])
|
|
131
|
+
if type(self.optarr[bb][2]) == type(.0):
|
|
132
|
+
self.__dict__[self.optarr[bb][1]] = float(self.optarr[bb][2])
|
|
133
|
+
if type(self.optarr[bb][2]) == type(""):
|
|
134
|
+
self.__dict__[self.optarr[bb][1]] = str(self.optarr[bb][2])
|
|
135
|
+
try:
|
|
136
|
+
opts, args = getopt.getopt(argv, optletters)
|
|
137
|
+
except getopt.GetoptError as err:
|
|
138
|
+
print( "Invalid option(s) on command line:", err)
|
|
139
|
+
raise
|
|
140
|
+
return ()
|
|
141
|
+
except:
|
|
142
|
+
print(sys.exc_info())
|
|
143
|
+
|
|
144
|
+
#print( "opts", opts, "args", args)
|
|
145
|
+
for aa in opts:
|
|
146
|
+
for bb in range(len(self.optarr)):
|
|
147
|
+
if aa[0][1] == self.optarr[bb][0][0]:
|
|
148
|
+
#print( "match", aa, self.optarr[bb])
|
|
149
|
+
if len(self.optarr[bb][0]) > 1:
|
|
150
|
+
#print( "arg", self.optarr[bb][1], aa[1])
|
|
151
|
+
if self.optarr[bb][2] != None:
|
|
152
|
+
if type(self.optarr[bb][2]) == type(0):
|
|
153
|
+
self.__dict__[self.optarr[bb][1]] = int(aa[1])
|
|
154
|
+
if type(self.optarr[bb][2]) == type(.0):
|
|
155
|
+
self.__dict__[self.optarr[bb][1]] = float(aa[1])
|
|
156
|
+
if type(self.optarr[bb][2]) == type(""):
|
|
157
|
+
self.__dict__[self.optarr[bb][1]] = str(aa[1])
|
|
158
|
+
else:
|
|
159
|
+
#print( "set", self.optarr[bb][1], self.optarr[bb][2])
|
|
160
|
+
if self.optarr[bb][2] != None:
|
|
161
|
+
self.__dict__[self.optarr[bb][1]] = 1
|
|
162
|
+
#print( "call", self.optarr[bb][3])
|
|
163
|
+
if self.optarr[bb][3] != None:
|
|
164
|
+
self.optarr[bb][3]()
|
|
165
|
+
return args
|
|
166
|
+
|
|
167
|
+
# ------------------------------------------------------------------------
|
|
168
|
+
# Long form help
|
|
169
|
+
|
|
170
|
+
def phelplong():
|
|
171
|
+
|
|
172
|
+
if glhead:
|
|
173
|
+
print(glhead)
|
|
174
|
+
|
|
175
|
+
print( "Usage:", glprog, glargs)
|
|
176
|
+
print( " options:")
|
|
177
|
+
try:
|
|
178
|
+
for aa in gloptarr:
|
|
179
|
+
longop = aa[1].replace("=", "")
|
|
180
|
+
if "=" in aa[1]:
|
|
181
|
+
arg = aa[2]
|
|
182
|
+
else:
|
|
183
|
+
arg = " "
|
|
184
|
+
|
|
185
|
+
pad = " " * (8 - len(longop))
|
|
186
|
+
pad2 = " " * (8 - len(arg))
|
|
187
|
+
|
|
188
|
+
print(" ", "-" + aa[0][0], " ",
|
|
189
|
+
"--" + longop, pad, arg, pad2,"- ", aa[5])
|
|
190
|
+
if glfoot:
|
|
191
|
+
print(glfoot)
|
|
192
|
+
except:
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
# Sat 11.May.2024 only exit if real stdout
|
|
196
|
+
if sys.stdout.isatty():
|
|
197
|
+
sys.exit(0)
|
|
198
|
+
|
|
199
|
+
# ------------------------------------------------------------------------
|
|
200
|
+
# Handle command line. Interpret optarray and decorate the class;
|
|
201
|
+
# Uses UNIX getopt for compatibility;
|
|
202
|
+
#
|
|
203
|
+
# Option parameters:
|
|
204
|
+
#
|
|
205
|
+
# option, long_option, var_name, initial_value, function
|
|
206
|
+
#
|
|
207
|
+
# Option with parameters: add trailing colon (:)
|
|
208
|
+
# Long opt with parameters: add training equal sign (=)
|
|
209
|
+
#
|
|
210
|
+
# Example:
|
|
211
|
+
#
|
|
212
|
+
#optarrlong = [\
|
|
213
|
+
# ["d:", "debug=", "pgdebug", 0, None], \
|
|
214
|
+
# ["p:", "port", "port", 9999, None], \
|
|
215
|
+
# ["v", "verbose", "verbose", 0, None], \
|
|
216
|
+
# ["t", "test", "test", "x", None], \
|
|
217
|
+
# ["V", "version", None, None, pversion], \
|
|
218
|
+
# ["h", "help", None, None, phelp], \
|
|
219
|
+
# ["i:", "input=", "input", "-", None], \
|
|
220
|
+
# ]
|
|
221
|
+
|
|
222
|
+
# option [:], long_option[=], var_name, initial_value, function, helpstr
|
|
223
|
+
optarrlong = [\
|
|
224
|
+
["d:", "debug=", "pgdebug", 0, None, "Debug level. 0=none 10=noisy. Default: 0" ],
|
|
225
|
+
["p:", "port=", "port", 6666, None, "Listen on port. Default: 6666"],
|
|
226
|
+
["v", "verbose", "verbose", 0, None, "Verbose. Show more info."],
|
|
227
|
+
["q", "quiet", "quiet", 0, None, "Quiet. Show less info."],
|
|
228
|
+
["V", "version", "version", None, pversion, "Print Version string."],
|
|
229
|
+
["h", "help", "help", None, phelplong, "Show Help. (this screen)"]
|
|
230
|
+
]
|
|
231
|
+
|
|
232
|
+
class ConfigLong:
|
|
233
|
+
|
|
234
|
+
def __init__(self, optarr):
|
|
235
|
+
|
|
236
|
+
ddd = dupoptcheck(optarr)
|
|
237
|
+
if ddd:
|
|
238
|
+
raise ValueError("Duplicate options on comline.", ddd)
|
|
239
|
+
|
|
240
|
+
global gloptarr
|
|
241
|
+
gloptarr = optarr
|
|
242
|
+
self._optarr = optarr
|
|
243
|
+
self.err = None
|
|
244
|
+
|
|
245
|
+
# Create defaults:
|
|
246
|
+
for bb in range(len(self._optarr)):
|
|
247
|
+
if self._optarr[bb][2]:
|
|
248
|
+
#print("init", self._optarr[bb][2],
|
|
249
|
+
# self._optarr[bb][3], type(self._optarr[bb][3]))
|
|
250
|
+
# Coerse type
|
|
251
|
+
if self._optarr[bb][3] == None:
|
|
252
|
+
self.__dict__[self._optarr[bb][2]] = None
|
|
253
|
+
elif type(self._optarr[bb][3]) == type(0):
|
|
254
|
+
self.__dict__[self._optarr[bb][2]] = int(self._optarr[bb][3])
|
|
255
|
+
elif type(self._optarr[bb][3]) == type(0.):
|
|
256
|
+
self.__dict__[self._optarr[bb][2]] = float(self._optarr[bb][3])
|
|
257
|
+
elif type(self._optarr[bb][3]) == type(""):
|
|
258
|
+
self.__dict__[self._optarr[bb][2]] = str(self._optarr[bb][3])
|
|
259
|
+
else:
|
|
260
|
+
print("Can only have int and str type; not", type(self._optarr[bb][3]))
|
|
261
|
+
raise ValueError("Can only None, int, float and string type - not %s" \
|
|
262
|
+
% (type(self._optarr[bb][3])))
|
|
263
|
+
|
|
264
|
+
def printvars(self):
|
|
265
|
+
print("Variables -----")
|
|
266
|
+
for aa in dir(self):
|
|
267
|
+
try:
|
|
268
|
+
if aa[:2] == "__" :
|
|
269
|
+
continue
|
|
270
|
+
if aa != "_optarr" and aa != "comline" and \
|
|
271
|
+
aa != "printvars" :
|
|
272
|
+
ff = getattr(self, aa)
|
|
273
|
+
if type(ff) == type(self.printvars):
|
|
274
|
+
fff = "function"
|
|
275
|
+
else:
|
|
276
|
+
fff = type(ff)
|
|
277
|
+
print(aa, ff, fff)
|
|
278
|
+
except:
|
|
279
|
+
pass
|
|
280
|
+
print("End Variables -----")
|
|
281
|
+
|
|
282
|
+
def comline(self, argv, pgdebug = 0):
|
|
283
|
+
|
|
284
|
+
''' Parse what is comong from the command line '''
|
|
285
|
+
|
|
286
|
+
optletters = ""; longopt = []
|
|
287
|
+
for aa in self._optarr:
|
|
288
|
+
if aa[0] in optletters:
|
|
289
|
+
print ("Warning: duplicate option", "'" + aa[0] + "'")
|
|
290
|
+
#if len(aa[0]) > 1 and aa[0][1] != ':':
|
|
291
|
+
optletters += aa[0]
|
|
292
|
+
longopt.append(aa[1])
|
|
293
|
+
|
|
294
|
+
#print("optleters", optletters, "longopt", longopt)
|
|
295
|
+
|
|
296
|
+
try:
|
|
297
|
+
opts, args = getopt.getopt(argv, optletters, longopt)
|
|
298
|
+
#except getopt.GetoptError, err:
|
|
299
|
+
except getopt.GetoptError as err:
|
|
300
|
+
print("Invalid option(s) on command line: %s" % err)
|
|
301
|
+
raise
|
|
302
|
+
|
|
303
|
+
if pgdebug:
|
|
304
|
+
print ("opts", opts, "args", args)
|
|
305
|
+
for aa in opts:
|
|
306
|
+
for bb in range(len(self._optarr)):
|
|
307
|
+
ddd = None
|
|
308
|
+
if aa[0][1] == "-":
|
|
309
|
+
ddd = "--" + self._optarr[bb][0]
|
|
310
|
+
eee = "--" + self._optarr[bb][1]
|
|
311
|
+
elif aa[0][0] == "-":
|
|
312
|
+
ddd = "-" + self._optarr[bb][0]
|
|
313
|
+
eee = "-" + self._optarr[bb][1]
|
|
314
|
+
else:
|
|
315
|
+
ddd = self._optarr[bb]
|
|
316
|
+
|
|
317
|
+
if ddd[-1:] == "=":
|
|
318
|
+
ddd = ddd[:-1]
|
|
319
|
+
eee = eee[:-1]
|
|
320
|
+
if ddd[-1:] == ":":
|
|
321
|
+
ddd = ddd[:-1]
|
|
322
|
+
eee = eee[:-1]
|
|
323
|
+
|
|
324
|
+
if pgdebug:
|
|
325
|
+
print ("aa", aa, "bb", bb, "one opt =", self._optarr[bb][:-1], ddd, eee)
|
|
326
|
+
if aa[0] == ddd or aa[0] == eee:
|
|
327
|
+
#print ("match", aa, ddd)
|
|
328
|
+
if len(self._optarr[bb][0]) > 1:
|
|
329
|
+
if pgdebug:
|
|
330
|
+
print ("arg", self._optarr[bb][2], self._optarr[bb][3], aa)
|
|
331
|
+
if self._optarr[bb][3] != None:
|
|
332
|
+
if type(self._optarr[bb][3]) == type(0):
|
|
333
|
+
if aa[1][:2] == "0x" or aa[1][:2] == "0X":
|
|
334
|
+
self.__dict__[self._optarr[bb][2]] = int(aa[1][2:], 16)
|
|
335
|
+
else:
|
|
336
|
+
self.__dict__[self._optarr[bb][2]] = int(aa[1])
|
|
337
|
+
pass
|
|
338
|
+
|
|
339
|
+
elif type(self._optarr[bb][2]) == type(""):
|
|
340
|
+
self.__dict__[self._optarr[bb][2]] = str(aa[1])
|
|
341
|
+
else:
|
|
342
|
+
if pgdebug:
|
|
343
|
+
print ("set 1",
|
|
344
|
+
self._optarr[bb][1], "set 2", self._optarr[bb][2],
|
|
345
|
+
"set 3", self._optarr[bb][3])
|
|
346
|
+
if self._optarr[bb][3] != None:
|
|
347
|
+
self.__dict__[self._optarr[bb][2]] += 1
|
|
348
|
+
#print ("call", self.optarr[bb][3])
|
|
349
|
+
if self._optarr[bb][4] != None:
|
|
350
|
+
self._optarr[bb][4]()
|
|
351
|
+
return args
|
|
352
|
+
|
|
353
|
+
# ------------------------------------------------------------------------
|
|
354
|
+
# Print an exception as the system would print it
|
|
355
|
+
|
|
356
|
+
def print_exception(xstr):
|
|
357
|
+
cumm = xstr + " "
|
|
358
|
+
a,b,c = sys.exc_info()
|
|
359
|
+
if a != None:
|
|
360
|
+
cumm += str(a) + " " + str(b) + "\n"
|
|
361
|
+
try:
|
|
362
|
+
#cumm += str(traceback.format_tb(c, 10))
|
|
363
|
+
ttt = traceback.extract_tb(c)
|
|
364
|
+
for aa in ttt:
|
|
365
|
+
cumm += "File: " + os.path.basename(aa[0]) + \
|
|
366
|
+
" Line: " + str(aa[1]) + "\n" + \
|
|
367
|
+
" Context: " + aa[2] + " -> " + aa[3] + "\n"
|
|
368
|
+
except:
|
|
369
|
+
print ("Could not print trace stack. ", sys.exc_info())
|
|
370
|
+
print (cumm)
|
|
371
|
+
|
|
372
|
+
# EOF
|
|
@@ -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)
|
|
@@ -106,14 +106,16 @@ class SimpleTree(Gtk.TreeView):
|
|
|
106
106
|
def setActcallb(self, callb):
|
|
107
107
|
self.actcallb = callb
|
|
108
108
|
|
|
109
|
-
def append(self, args):
|
|
109
|
+
def append(self, args, parent = None):
|
|
110
110
|
#print("append", args)
|
|
111
|
-
piter = self.treestore.append(
|
|
111
|
+
piter = self.treestore.append(parent, args)
|
|
112
|
+
return piter
|
|
112
113
|
|
|
113
114
|
# TreeStore
|
|
114
115
|
def insert(self, parent, pos, args):
|
|
115
116
|
print("insert", parent, pos, args)
|
|
116
117
|
piter = self.treestore.insert(parent, pos, args)
|
|
118
|
+
return piter
|
|
117
119
|
|
|
118
120
|
def sel_first(self):
|
|
119
121
|
#print("sel first ...")
|
|
@@ -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(
|
|
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 = ""
|
|
@@ -121,13 +165,33 @@ def randlett(lenx):
|
|
|
121
165
|
|
|
122
166
|
return strx
|
|
123
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
|
+
|
|
124
189
|
# ------------------------------------------------------------------------
|
|
125
190
|
# Random colors
|
|
126
191
|
|
|
127
192
|
def randcol():
|
|
128
193
|
return random.randint(0, 255)
|
|
129
194
|
|
|
130
|
-
|
|
131
195
|
def randcolstr(start = 0, endd = 255):
|
|
132
196
|
rr = random.randint(start, endd)
|
|
133
197
|
gg = random.randint(start, endd)
|
|
@@ -608,60 +608,6 @@ def readfile(strx, sep = None):
|
|
|
608
608
|
|
|
609
609
|
return text
|
|
610
610
|
|
|
611
|
-
# ------------------------------------------------------------------------
|
|
612
|
-
# Handle command line. Interpret optarray and decorate the class
|
|
613
|
-
# This allows a lot of sub utils to have a common set of options.
|
|
614
|
-
|
|
615
|
-
class Config:
|
|
616
|
-
|
|
617
|
-
def __init__(self, optarr):
|
|
618
|
-
self.optarr = optarr
|
|
619
|
-
self.verbose = False
|
|
620
|
-
self.debug = False
|
|
621
|
-
|
|
622
|
-
def comline(self, argv):
|
|
623
|
-
optletters = ""
|
|
624
|
-
for aa in self.optarr:
|
|
625
|
-
optletters += aa[0]
|
|
626
|
-
#print( optletters )
|
|
627
|
-
# Create defaults:
|
|
628
|
-
err = 0
|
|
629
|
-
for bb in range(len(self.optarr)):
|
|
630
|
-
if self.optarr[bb][1]:
|
|
631
|
-
# Coerse type
|
|
632
|
-
if type(self.optarr[bb][2]) == type(0):
|
|
633
|
-
self.__dict__[self.optarr[bb][1]] = int(self.optarr[bb][2])
|
|
634
|
-
if type(self.optarr[bb][2]) == type(""):
|
|
635
|
-
self.__dict__[self.optarr[bb][1]] = str(self.optarr[bb][2])
|
|
636
|
-
try:
|
|
637
|
-
opts, args = getopt.getopt(argv, optletters)
|
|
638
|
-
#except getopt.GetoptError, err:
|
|
639
|
-
except:
|
|
640
|
-
print( "Invalid option(s) on command line:", err)
|
|
641
|
-
#support.put_exception("comline")
|
|
642
|
-
return ()
|
|
643
|
-
|
|
644
|
-
#print( "opts", opts, "args", args)
|
|
645
|
-
for aa in opts:
|
|
646
|
-
for bb in range(len(self.optarr)):
|
|
647
|
-
if aa[0][1] == self.optarr[bb][0][0]:
|
|
648
|
-
#print( "match", aa, self.optarr[bb])
|
|
649
|
-
if len(self.optarr[bb][0]) > 1:
|
|
650
|
-
#print( "arg", self.optarr[bb][1], aa[1])
|
|
651
|
-
if self.optarr[bb][2] != None:
|
|
652
|
-
if type(self.optarr[bb][2]) == type(0):
|
|
653
|
-
self.__dict__[self.optarr[bb][1]] = int(aa[1])
|
|
654
|
-
if type(self.optarr[bb][2]) == type(""):
|
|
655
|
-
self.__dict__[self.optarr[bb][1]] = str(aa[1])
|
|
656
|
-
else:
|
|
657
|
-
#print( "set", self.optarr[bb][1], self.optarr[bb][2])
|
|
658
|
-
if self.optarr[bb][2] != None:
|
|
659
|
-
self.__dict__[self.optarr[bb][1]] = 1
|
|
660
|
-
#print( "call", self.optarr[bb][3])
|
|
661
|
-
if self.optarr[bb][3] != None:
|
|
662
|
-
self.optarr[bb][3]()
|
|
663
|
-
return args
|
|
664
|
-
|
|
665
611
|
def about(progname, verstr = "1.0.0", imgfile = "icon.png"):
|
|
666
612
|
|
|
667
613
|
''' Show About dialog: '''
|
|
@@ -879,6 +825,15 @@ def print_exception(xstr):
|
|
|
879
825
|
print("Could not print trace stack. ", sys.exc_info())
|
|
880
826
|
print( cumm)
|
|
881
827
|
|
|
828
|
+
# -----------------------------------------------------------------------
|
|
829
|
+
# Allow the system to breed, no wait
|
|
830
|
+
|
|
831
|
+
def ubreed():
|
|
832
|
+
|
|
833
|
+
while True:
|
|
834
|
+
if not Gtk.main_iteration_do(False):
|
|
835
|
+
break
|
|
836
|
+
|
|
882
837
|
# -----------------------------------------------------------------------
|
|
883
838
|
# Sleep just a little, but allow the system to breed
|
|
884
839
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
from __future__ import print_function
|
|
4
|
+
|
|
5
|
+
import os, sys, string, time, traceback, getopt
|
|
6
|
+
import random, glob, warnings
|
|
7
|
+
|
|
8
|
+
import comline
|
|
9
|
+
|
|
10
|
+
version = "0.00"
|
|
11
|
+
|
|
12
|
+
# ------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
def phelp():
|
|
15
|
+
|
|
16
|
+
comline.phelplong()
|
|
17
|
+
sys.exit(0)
|
|
18
|
+
|
|
19
|
+
#print()
|
|
20
|
+
#print( "Usage: " + os.path.basename(sys.argv[0]) + " [options]")
|
|
21
|
+
#print()
|
|
22
|
+
#print( "Options: -d level - Debug level 0-10")
|
|
23
|
+
#print( " -p - Port to use (default: 9999)")
|
|
24
|
+
#print( " -v - Verbose")
|
|
25
|
+
#print( " -V - Version")
|
|
26
|
+
#print( " -q - Quiet")
|
|
27
|
+
#print( " -h - Help")
|
|
28
|
+
#print()
|
|
29
|
+
#sys.exit(0)
|
|
30
|
+
#
|
|
31
|
+
# ------------------------------------------------------------------------
|
|
32
|
+
def pversion(ver = "1.0"):
|
|
33
|
+
|
|
34
|
+
comline.pversion(ver)
|
|
35
|
+
#print( os.path.basename(sys.argv[0]), "Version", version)
|
|
36
|
+
#sys.exit(0)
|
|
37
|
+
|
|
38
|
+
# option, var_name, initial_val, function, help
|
|
39
|
+
optarr = [\
|
|
40
|
+
["d:", "debug=", "pgdebug", 0, None, "Debug level. 0=none 10=noisy. Default: 0" ],
|
|
41
|
+
["p:", "port=", "port", 9999, None, "Listen on port. Default: 9999"],
|
|
42
|
+
["v", "verbose", "verbose", 0, None, "Verbose. Show more info."],
|
|
43
|
+
["q", "quiet", "quiet", 0, None, "Quiet. Show less info."],
|
|
44
|
+
["V", "version", None, None, pversion, "Print Version string."],
|
|
45
|
+
["h", "help", None, None, phelp, "Show Help. (this screen)"],
|
|
46
|
+
]
|
|
47
|
+
|
|
48
|
+
comline.setprog("Custom name")
|
|
49
|
+
comline.setargs("[options]")
|
|
50
|
+
comline.sethead("Header line.")
|
|
51
|
+
comline.setfoot("Footer line.")
|
|
52
|
+
conf = comline.ConfigLong(optarr)
|
|
53
|
+
|
|
54
|
+
if __name__ == '__main__':
|
|
55
|
+
|
|
56
|
+
args = conf.comline(sys.argv[1:])
|
|
57
|
+
pversion()
|
|
58
|
+
print()
|
|
59
|
+
phelp()
|
|
60
|
+
sys.exit(0)
|
|
61
|
+
|
|
62
|
+
# EOF
|
|
@@ -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,
|
|
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
|
|
@@ -69,18 +69,23 @@ tw = pgtestwin()
|
|
|
69
69
|
|
|
70
70
|
#print("test")
|
|
71
71
|
|
|
72
|
-
def fillrand():
|
|
72
|
+
def fillrand(size = 10):
|
|
73
73
|
aaa = []
|
|
74
|
-
for aa in range(
|
|
74
|
+
for aa in range(size):
|
|
75
75
|
aaa.append( (pgtests.randstr(12), pgtests.randstr(12),
|
|
76
76
|
pgtests.randstr(12), pgtests.randstr(12)) )
|
|
77
77
|
return aaa
|
|
78
78
|
|
|
79
|
-
aaa = fillrand()
|
|
80
79
|
tw.treeview.clear()
|
|
80
|
+
|
|
81
|
+
aaa = fillrand(6)
|
|
81
82
|
for aa in aaa:
|
|
82
83
|
try:
|
|
83
|
-
tw.treeview.append(aa)
|
|
84
|
+
to = tw.treeview.append(aa)
|
|
85
|
+
bbb = fillrand(5)
|
|
86
|
+
for bb in bbb:
|
|
87
|
+
to2 = tw.treeview.append(bb, to)
|
|
88
|
+
|
|
84
89
|
except:
|
|
85
90
|
print(sys.exc_info())
|
|
86
91
|
|
|
@@ -37,7 +37,7 @@ def test_rand2(arg2, arg3):
|
|
|
37
37
|
arg3.set_text(rrr)
|
|
38
38
|
|
|
39
39
|
def test_rand3(arg2, arg3):
|
|
40
|
-
rrr = pgtests.simname(
|
|
40
|
+
rrr = pgtests.simname(random.randint(9, 18))
|
|
41
41
|
print(rrr)
|
|
42
42
|
arg3.set_text(rrr)
|
|
43
43
|
|
|
@@ -46,6 +46,26 @@ def test_rand4(arg2, arg3):
|
|
|
46
46
|
print(rrr)
|
|
47
47
|
arg3.set_text(rrr)
|
|
48
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
|
+
|
|
49
69
|
if __name__ == "__main__":
|
|
50
70
|
|
|
51
71
|
w = Gtk.Window()
|
|
@@ -83,6 +103,18 @@ if __name__ == "__main__":
|
|
|
83
103
|
butt.connect("clicked", test_rand4, lab1)
|
|
84
104
|
vbox.pack_start(butt, 0, 0, 2)
|
|
85
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
|
+
|
|
86
118
|
butt = Gtk.Button.new_with_mnemonic("E_xit")
|
|
87
119
|
butt.connect("clicked", Gtk.main_quit)
|
|
88
120
|
vbox.pack_start(butt, 0, 0, 2)
|
|
@@ -2,6 +2,7 @@ README.md
|
|
|
2
2
|
setup.py
|
|
3
3
|
pyvguicom/__init__.py
|
|
4
4
|
pyvguicom/browsewin.py
|
|
5
|
+
pyvguicom/comline.py
|
|
5
6
|
pyvguicom/custwidg.py
|
|
6
7
|
pyvguicom/htmledit.py
|
|
7
8
|
pyvguicom/pgbox.py
|
|
@@ -16,6 +17,7 @@ pyvguicom/pgutils.py
|
|
|
16
17
|
pyvguicom/pgwkit.py
|
|
17
18
|
pyvguicom/plug.py
|
|
18
19
|
pyvguicom/testbutt.py
|
|
20
|
+
pyvguicom/testcline.py
|
|
19
21
|
pyvguicom/testcust.py
|
|
20
22
|
pyvguicom/testentry.py
|
|
21
23
|
pyvguicom/testgui.py
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|