From 86ba219c11030890a2bfcbb828fcb485d97b49a1 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 2 Apr 2016 23:07:00 +0800 Subject: [PATCH] examples/arguments_demo: demonstrate arguments from datasets (#368) --- examples/master/repository/arguments_demo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/master/repository/arguments_demo.py b/examples/master/repository/arguments_demo.py index c26879c2c..4d926d4f4 100644 --- a/examples/master/repository/arguments_demo.py +++ b/examples/master/repository/arguments_demo.py @@ -37,7 +37,10 @@ class SubComponent2(HasEnvironment): class ArgumentsDemo(EnvExperiment): def build(self): - self.setattr_argument("pyon_value", PYONValue(None)) + # change the "foo" dataset and click the "recompute argument" + # buttons. + self.setattr_argument("pyon_value", + PYONValue(self.get_dataset("foo", default=42))) self.setattr_argument("number", NumberValue(42e-6, unit="us", scale=1e-6, ndecimals=4))