Debian Codegraph @

doc/samples/getargs.py

raw symbols SCIP
1 DOIT_CONFIG = {
2 'default_tasks': ['use_cmd', 'use_python'],
3 'action_string_formatting': 'both',
4 }
5
6 def task_compute():
7 def comp():
8 return {'x':5,'y':10, 'z': 20}
9 return {'actions': [(comp,)]}
10
11
12 def task_use_cmd():
13 return {'actions': ['echo x={x}', # new-style formatting
14 'echo z=%(z)s'], # old-style formatting
15 'getargs': {'x': ('compute', 'x'),
16 'z': ('compute', 'z')},
17 'verbosity': 2,
18 }
19
20
21 def task_use_python():
22 return {'actions': [show_getargs],
23 'getargs': {'x': ('compute', 'x'),
24 'y': ('compute', 'z')},
25 'verbosity': 2,
26 }
27 def show_getargs(x, y):
28 print("this is x: {}".format(x))
29 print("this is y: {}".format(y))