I want to create an upload program with uploading gauges. I have a function that is a callback function: < Pre> and it shows (gauge changes only at the end of 100%): Full code: < / P> Passing less than 1 value is considered to change 0. Follow as Change def myupdater (auto, current, total): m = (decimal (current) / decimal (total)) print "upload {0} / {1} so far". Format (current, total) self.gauge_1.SetValue (m) Print (m) Print (self.gauge_1.GetValue) wx.Yield () Print "---------- ------- ----- "
gauge_1 .. line:
self.gauge_1 = wx.Gauge (self.notebook_1_pane_1, -1, 100)
myupdater as follows:
def myupdater (auto, current, total): m = 100 * current / total self.gauge_1 .SetValue (m) wx.Yield ()
No comments:
Post a Comment