WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   running multiple vizard scripts from python (https://forum.worldviz.com/showthread.php?t=342)

exhale 05-09-2005 01:55 AM

running multiple vizard scripts from python
 
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:


Quote:

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


All times are GMT -7. The time now is 03:12 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC