Beispiel #1
0
)
parser.add_argument(
    "-b",
    "--binary",
    nargs=1,
    help="Stela Binary"
)
args = parser.parse_args()
ex = Extrapolate()
print args.root
print args.binary
print args.database
ex.set_root(args.root[0])
os.chdir(args.binary[0])
db = args.database[0]
dbo = DB(db)
ex.set_db(db)
thread_list = []
for f in ex.get_file_list():
    if(re.search("_a_sim.xml$", f)and not
       dbo.have_finished_id(f.split("_")[0])):
        print f
        while(len(thread_list) > 4):
            for t in thread_list:
                if not t.isAlive():
                    t.handled = True
            thread_list = [t for t in thread_list if not t.handled]
        thread0 = ExtrapolateThread(f, ex, db)
        thread0.start()
        thread_list.append(thread0)