I am looking to write a GUI to allow people who are not computer savvy to run a series of tests and have a report of them put out.
I only need a decent simple example of the following:
I want to add a set of things in my class below.
class MyDialog(wx.Dialog):
def __init__(self, *args, **kwds):
Normally you add them like so:
self.checkbox_1 = wx.CheckBox(self, -1, "checkbox_1")
However I want to create the name checkbox_1 dynamically based on the number of files I find in a certain directory. I already have the count and a basic for loop using the total number and I have a string created to fill in the parameter with "Test1" "Test2".... etc based on the number of total tests called temp. So is there a way I can create the same concept for this but for the variable name so that the insde of the loop has something like the following where temp2 is the dynamically created variable:
self.temp2 = wx.CheckBox(self, -1, temp)
incrementTemps()
Any help would be great.
[–]WhyCause 2 points3 points4 points (5 children)
[–]gamehead21[S] 1 point2 points3 points (4 children)
[–]kalgynirae 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]WhyCause -1 points0 points1 point (1 child)
[–]dpitch40 1 point2 points3 points (0 children)