def lookUpAll(self,group): """ Show all the contacts from a group group is the group's name the return is the list of the group members """ cr=ContactRepository() return cr.getAllGr(group)
def exportCSV(self,group,outFile): """ Export all the group members to a text file group is a contact group chosen by the user outFile is the output file where the members will appear, separated by comma """ f=open(outFile,'w') cr=ContactRepository() list=cr.getAllGr(group) for i in list: x=i.getName()+','+i.getPhoneNr() f.write(x) f.write('\n') f.close()