I'm not sure what you mean by "shutting down the Vizard environment".
In general though, it sounds like you should be using the viztask module. The documentation describes how to use tasks, and they are ideal for controlling the flow of a script in stages. You would probably implement each stage as a subtask and have a high-level main task that simply runs each stage consecutively.
Let me know if you have more specific questions.
|