summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/allnoconfig.py4
-rw-r--r--examples/allnoconfig_simpler.py4
-rw-r--r--examples/allyesconfig.py10
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/allnoconfig.py b/examples/allnoconfig.py
index 7c22036..271751b 100644
--- a/examples/allnoconfig.py
+++ b/examples/allnoconfig.py
@@ -22,9 +22,9 @@ while not done:
# (currently) be changed, as well as for non-bool/tristate symbols.
lower_bound = sym.get_lower_bound()
if lower_bound is not None and \
- kconfiglib.tri_less(lower_bound, sym.calc_value()):
+ kconfiglib.tri_less(lower_bound, sym.get_value()):
- sym.set_value(lower_bound)
+ sym.set_user_value(lower_bound)
# We just changed the value of some symbol. As this may affect
# other symbols, keep going.
done = False
diff --git a/examples/allnoconfig_simpler.py b/examples/allnoconfig_simpler.py
index 4846a7f..affa004 100644
--- a/examples/allnoconfig_simpler.py
+++ b/examples/allnoconfig_simpler.py
@@ -6,7 +6,7 @@
# selects.
# This version is a bit slower compared allnoconfig.py since Kconfiglib
-# invalidates all dependent symbols for each set_value() call. This does not
+# invalidates all dependent symbols for each set_user_value() call. This does not
# happen for load_config(), which instead invalidates all symbols once after
# the configuration has been loaded. This is OK for load_config() since nearly
# all symbols will tend to be affected anyway.
@@ -18,6 +18,6 @@ conf = kconfiglib.Config(sys.argv[1])
for sym in conf:
if sym.get_type() in (kconfiglib.BOOL, kconfiglib.TRISTATE):
- sym.set_value("n")
+ sym.set_user_value("n")
conf.write_config(".config")
diff --git a/examples/allyesconfig.py b/examples/allyesconfig.py
index aa1d58b..1281015 100644
--- a/examples/allyesconfig.py
+++ b/examples/allyesconfig.py
@@ -34,8 +34,8 @@ while not done:
# See corresponding comment for allnoconfig implementation
if upper_bound is not None and \
- kconfiglib.tri_less(sym.calc_value(), upper_bound):
- sym.set_value(upper_bound)
+ kconfiglib.tri_less(sym.get_value(), upper_bound):
+ sym.set_user_value(upper_bound)
done = False
# Handle symbols within choices
@@ -48,7 +48,7 @@ while not done:
selection = choice.get_selection_from_defaults()
if selection is not None and \
selection is not choice.get_user_selection():
- selection.set_value("y")
+ selection.set_user_value("y")
done = False
# Handle choices whose visibility only allow them to be in "m" mode.
@@ -57,9 +57,9 @@ while not done:
elif choice.get_visibility() == "m":
for sym in choice.get_actual_items():
- if sym.calc_value() != "m" and \
+ if sym.get_value() != "m" and \
sym.get_upper_bound() != "n":
- sym.set_value("m")
+ sym.set_user_value("m")
done = False
conf.write_config(".config")