PDA

View Full Version : running multiple vizard scripts from python


exhale
05-09-2005, 01:55 AM
Hello,

This is what I want to accomplish:
A main.py file runs several vizard scripts one after another.

This command is used to run the vizard scripts:


execCommand = viz._BIN_PRIMARY + ' "' + filename + '" 0'


win32process.CreateProcess(None, execCommand,


None, None, 1, 0, None,


None, win32process.STARTUPINFO())

Now the problem is it runs several of the vizard scripts at the same time. I could not really find module descriptions for win32process .. Now my question is, is it possible to run a script, then wait till that process is over and then continue the main script?

EDIT: I've also been experimenting with spawnl(P_WAIT, execCommand) but when the first vizard script is launched and i quit the graphical window, it doesnt continue the original script. Apparently this is caused because my calling function was startscript, which seems to be implemented in vizard.. But either way i haven't got it to work .

greets,

Kevin

exhale
05-09-2005, 05:35 AM
got it to work using:

os.system('c:\\Progra~1\\Vizard25\\bin\\winviz.exe c:\\Progra~1\\Vizard25\\experimenten\\Final\\a-01.py 0')

this is dynamically changed, but that's what it comes down to.

greets