def findPacket(self, form): db = self.__db cursor = self.__cursor hostname = self.__hostname pHandler = ProjectDatabaseHandler(db, cursor) packets = [] pString = "" keyword = form.getvalue("keyword") packetsList = pHandler.matchProjectKeyword(keyword) for pID in packetsList: pText = packetsList[pID] packets.append(pText) pString = string.join(packets, ", ") print "Content-type:text/html" print print pString