I'm still very new to python, and I have a question about how to prioritize jobs in a queue. Currently, I have a simple script that does the following:
job1 = [1, 'Task1', 'v03', '-start', 'Bonnie'] job2 = [2, 'Task2', 'v01', '-start', 'Billy'] job3 = [3, 'Task3', 'v01', '-start', 'Bob'] jobsequence = (job1, job2, job3) for job in jobsequence: jnam=job[1] jop=job[3] jver=job[2] jreq=job[4] jpatch=job[5] jid=jnam+'/'+jver cmdline= /home/user/program/start '+' '+jop+' -proj '+jnam+' -dir '+'/home/user/programdata/'+jnam+'/'+jver; os.popen2(cmdline,mode='t',bufsize=-1) x=0 delay=5 while os.path.exists(jid+'/log.pid'): time.sleep(60*delay) x=x+1 print 'Job Complete' What I would like to do is populate the job listings interactively (using input lines) and be able to change priority on uncompleted jobs still in the queue, and add jobs to the queue. I appreciate any help you folks can offer. Keith Nation
-- http://mail.python.org/mailman/listinfo/python-list