Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example show different ways of adding node hierarchy.


Code Block
languagepy
titleOld style
import ecflow
defs = ecflow.Defs()
s = ecflow.Suite('s1')
f = ecflow.Family('f1')
t = ecflow.Task('t1')
defs.add_suite(s)
s.add_suite(f)
f.add_task(t)



Code Block
languagepy
titleUsing Add
from ecflow import 
ecflow
*
defs = 
ecflow.
Defs()
defs
.add(
  Suite('s1').add(
   Family('f1').add(
      Task('t1'))))



Code Block
languagepy
titleUsing Constructor
from ecflow import *
defs = ecflow.Defs( 
  Suite('s1',
   Family('f1',
      Task('t1'))))



Code Block
languagepy
titleUsing + with parenthesis
from ecflow import *
defs = Defs() + (Suite('s1') + (Family('f1') + Task('t1')))





The following example shows how suites, families and tasks are created in a Python definition file.

...