有两份名单/备忘录,我想逐一列出。
import Mybench
process = []
benchmarks = options.benchmark.split( , )
for bench_name in benchmarks:
process.append(getattr(Mybench, bench_name))
还编制了另一个清单(清单)。 我现在想这样做:
i = 0
for i, cpu in cpus:
print "cpu", i, "assigned to ", process[i]
cpu.workload = process[i]
i = i+1
然而,在产出一中,见:
cpu 0 assigned to <orphan LiveProcess>
LiveProcess() is returned from Mybench. How can I fis that?