newbie script

Ed a.edmondson at eris.qinetiq.com
Wed Sep 24 09:26:07 EDT 2003


If you're UNIX based:

os.system('xyz') will return the exit status of your program xyz.
More importantly for you, it will return!

So try an (ugly) loop like:

import os
while 1:
        os.system('xyz')


-Ed

ataraxia2500 wrote:

> I wanna do a script that launch a programm xyz and relaunch xyz if it
> crashes. what kind of module do I need for such a task?

-- 
Andrew Edmondson
Senior Analyst
QinetiQ Malvern
Tel: +44 1684 897433
Mobile: +44 794 1103773
PGP Key:
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xCEE814DC
PGP Fingerprint: 7B32 4D1E AC4F 29E2 9EAA 9550 1A3D BBA4 CEE8 14DC





More information about the Python-list mailing list