def _btn_tag_clicked(self, button): """ select tag from tags dialog """ import tags tag = tags.select(self.root) if tag is not None: self._tag_input.set_text(tag)
("Wisconsin", "WI"), \ ("Wyoming", "WY") \ ) #statelist = [] # #for (state, code) in states: # statelist.append (code, '%s %s' % (code, state)) statelist2 = [ ("", "Ssergwergwetgelect state") ] # value goes 1st, actually for (state, code) in states: statelist2.append ((code, code)) if __name__ == "__main__": # statelines = split (states, '\n') # for stateline in statelines: # #toks = split (stateline) # state = stateline [:-4] # code = stateline [-3:-1] # print '("%s", "%s"), \t\t\t\\' % (state, code) # reverse order of tuples, combine print tags.select (tags.option (statelist))
("Virgin Islands", "VI"), \ ("Virginia", "VA"), \ ("Washington", "WA"), \ ("West Virginia", "WV"), \ ("Wisconsin", "WI"), \ ("Wyoming", "WY") \ ) #statelist = [] # #for (state, code) in states: # statelist.append (code, '%s %s' % (code, state)) statelist2 = [("", "Ssergwergwetgelect state")] # value goes 1st, actually for (state, code) in states: statelist2.append((code, code)) if __name__ == "__main__": # statelines = split (states, '\n') # for stateline in statelines: # #toks = split (stateline) # state = stateline [:-4] # code = stateline [-3:-1] # print '("%s", "%s"), \t\t\t\\' % (state, code) # reverse order of tuples, combine print tags.select(tags.option(statelist))