def main():
    s = drmaa.Session()
    s.initialize()
    print 'Creating job template'
    jt = s.createJobTemplate()
    jt.remoteCommand = os.getcwd() + '/sleeper.sh'
    jt.args = ['42','Simon says:']
    jt.joinFiles=True
    
    joblist = s.runBulkJobs(jt,1,30,2)
    print 'Your job has been submitted with id ' + str(joblist)

    s.synchronize(joblist, drmaa.Session.TIMEOUT_WAIT_FOREVER, False)
    for curjob in joblist:
        print 'Collecting job ' + curjob
        retval = s.wait(curjob, drmaa.Session.TIMEOUT_WAIT_FOREVER)
        print 'Job: ' + str(retval.jobId) + ' finished with status ' + str(retval.hasExited)
        
    print 'Cleaning up'
    s.deleteJobTemplate(jt)
    s.exit()
Convert language to a YAML-suitable format
dataset/ETHPy150Open pygridtools/drmaa-python/examples/example3.2.py/main--crossover with--dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/language.py/Language.to_map