I'm working on my python script to create the variables for the pixel size between 375 and 1234. When I'm adding the list of buttons, I want to check if the current button are between 375 and 1234 or greater than 1234.
When I'm pressing on the down arrow button of the keyboard, it will check on the pixel size between 375 and 1234, but there is a problem. When I check on the current button that are no greater than 1234 which the pixel size is between 375 and 1234, it will not let me to get pass on if CurrentRow >= pixel_start <= pixel_end:
.
I will always get pass on the end of the statement like this:
print "you are in greater than 1234"
Here is the code:
def GoRight(self):
basex, basey = self.getControl(4207 + self.channels_Index).getPosition()
basew = self.getControl(4207 + self.channels_Index).getWidth()
# change program controls to display the proper junks
if self.channels_Index == len(self.program_buttons[self.programs_Index]) - 1:
CurrentRow = self.setFocus(self.program_buttons[self.programs_Index][self.channels_Index])
pixel_start = 375
pixel_end = 1234
#Check on pixels size between start and end time
if CurrentRow >= pixel_start <= pixel_end:
print "you are in between 375 and 1234"
else:
print "you are in greater than 1234"
What I want to achieve is to check on the current button if they are between the pixel size between 375 and 1234 and if they are greater than 1234 then do something.
Does anyone know how I can check on the pixel size if the current button are between 375 and 1234 or if they are greater than 1234?