Executing a stream

The following example runs all executable nodes in the stream, and is the simplest type of stream script:

modeler.script.stream().runAll(None)

The following example also runs all executable nodes in the stream:

stream = modeler.script.stream()
stream.runAll(None)

In this example, the stream is stored in a variable called stream. Storing the stream in a variable is useful because a script is typically used to modify either the stream or the nodes within a stream. Creating a variable that stores the stream results in a more concise script.