[Tutor] submitting batch jobs with python
Bob Gailer
ramrom@earthling.net
Mon Dec 23 15:58:00 2002
--=======49C94C1=======
Content-Type: text/plain; x-avg-checked=avg-ok-790D3F98; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit
At 01:22 PM 12/23/2002 -0600, Isaac Hall wrote:
>I am working on a program to submit several batch jobs with python.
>when one submits a batch job from a shell here, the system returns several
>lines of output telling you many things you need to know (like where the
>ouput will be written, etc....) I would like my program to capture this
>information, but I am a little unclear as to how to do this. It looks
>like the call os.popen('command').read() is the way to go, but I do not
>know what format this will put several lines into.
os.popen('command').read()
will return a string with lines separated by '\n'
os.popen('command').readlines()
will return a list of lines
>how will this handle submitting say 200 jobs at once. will each popen
>call only
>capture the lines intended for that job?
Each popen call will run one batch job and return that job's output.
Bob Gailer
mailto:ramrom@earthling.net
303 442 2625
--=======49C94C1=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-790D3F98
Content-Disposition: inline
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.431 / Virus Database: 242 - Release Date: 12/17/2002
--=======49C94C1=======--