def filter_jobs(self, jobs): filtered_jobs = [] for job in jobs: if self.job_filter(job): filtered_jobs.append(job) job.print_all() self.notify_job(job) print "total: %d" % len(filtered_jobs) return filtered_jobs
def print_jobs(self): """print all job info.""" for job in self.jobs: job.print_all() print "total: %d" % len(self.jobs)