[Python-de] Processs Management Problem
Josef Cihal
josef.cihal at irm.at
Tue Nov 12 09:01:34 EST 2002
Ich habe ein Process Management Problem:
Ablauf:
1. Start vom Process 1
2. Nachdem Process 1 fertig ist darf der nächste gestartet werden.
Process= ist ein Python Skript...
Danke für jede Idee...
(mit execv geht es nicht...
)>>> rc = os.execv("Z:\\make_mmi.py",())
Traceback (innermost last):
File "<stdin>", line 1, in ?
OSError: [Errno 8] Exec format error
lg
josef
Mein Versuch:
aProcess = win32process.CreateProcess( None,
aCmd,
None,
None,
0,
win32process.NORMAL_PRIORITY_CLASS,
None,
None,
win32process.STARTUPINFO()
)
i = 1
while 1:
rc = win32process.GetExitCodeProcess(aProcess[0])
if rc <> STILL_ACTIVE:
break
time.sleep(1)
if i == 30:
try: win32process.TerminateProcess(aProcess[0],0)
except win32process.error, x: print x
break
i = i + 1
More information about the Python-de
mailing list