def btnHelloWorld_clicked(self, widget): lbl = self.wTree.get_widget("label1") r = WUT_table.select(WUT_table.c.CustomID==4000500).execute() row = r.fetchone() lblstring = row['FirstName'] + "::" + row['Email'] lbl.set_text(lblstring) r = WUT_table.select().execute() rows = r.fetchall() for row in rows: print row['FirstName'] if row['CustomRateTable'] == 'Dktell01': fruits.append(Fruit(row['FirstName'], True)) return else: fruits.append(Fruit(row['FirstName'], False)) return print fruits ol = self.wTree.get_widget("objectlist1") ol.add(fruits) ol.show_all()