(self, questionnaire_id)
goto the sheet object specified by its questionnaire_id
goto the sheet object specified by its questionnaire_id
goto the sheet object specified by its questionnaire_id
def goto_questionnaire_id(self, questionnaire_id):
        '''goto the sheet object specified by its questionnaire_id
        '''

        qids = set()
        qids.add(questionnaire_id)
        # May also be an integer, so also add that if it can be decoded!
        try:
            qids.add(int(questionnaire_id))
        except ValueError:
            pass

        sheets = []
        def found():
            if self.sheet.questionnaire_id in qids:
                sheets.append(self.sheet)

        self.iterate(found)

        if len(sheets) == 1:
            self.goto_sheet(sheets[0])
        else:
            raise ValueError
def goto_questionnaire_id ( self , questionnaire_id ) : qids = set ( ) qids . add ( questionnaire_id ) # May also be an integer, so also add that if it can be decoded! try : qids . add ( int ( questionnaire_id ) ) except ValueError : pass sheets = [ ] def found ( ) : if self . sheet . questionnaire_id in qids : sheets . append ( self . sheet ) self . iterate ( found ) if len ( sheets ) == 1 : self . goto_sheet ( sheets [ 0 ] ) else : raise ValueError