#!/scratch/projects/compilers/intel24.0/oneapi/intelpython/python3.9/bin/python3
#^ always use TACC's python to start pylauncher. 

import pylauncher 
import argparse
import sys

parser = argparse.ArgumentParser()
parser.add_argument('jobs', help='list of commands to be run')
parser.add_argument('--cores', help='cores to use per job', default=1)
parser.add_argument('--timeout', help='timeout length (seconds)', default=2)
parser.add_argument('--queuestate', help='pylauncher queuestate (for resuming jobs)',default=None)

args = parser.parse_args()
if args.queuestate is not None:
    pylauncher.ResumeClassicLauncher(args.queuestate, cores=args.cores, timeout=args.timeout)
else:
    pylauncher.ClassicLauncher(args.jobs, cores=args.cores, timeout=args.timeout)
