errors = int(0)
for i in range(len(expectedData)):
if data[i] != expectedData[i]:
errors += int(binary_compare(data[i], expectedData[i]))
return errors
problem with a int variable by ChiCotje Tue Dec 09, 2008 2:35 am hello, I have a little problem with my code. The code is a simple textinput dialog (textCntrl). With the wx.Choice option you can influence the variabel that you fill in the TextCntrl. It happens at the "def OnButtonOK" function. So I want to influence the variable "timeInterval" ...
you're searching for something like? S2 = 0 S3 = 0 ... to define a variable with the name 's' + number? you can use 'exec' string = 's%i=current_server' % number exec string but I wouldn't recommend that. It's clearer (for me, at least) to use an auxiliary dictionary. You can set it up and actually ask for the defined keys. ...
hello, I want to replace integers for 0 and 1 with a cutoff value. For example: 0,21 0,45 0,78 cut off value: 0,30 0 1 1 The problem is that i don't know what the integers are. The user of my program is able to give the input (by raw_input) . So i can't use the replace(old, new) function. Is there ...