diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-30 00:50:09 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-30 01:14:20 +0100 |
| commit | 989e9f77cfe8caabc7ac241572e9b52682901135 (patch) | |
| tree | 9c70f1d1c08efc19803b4fe741ab1dd2c69b42cd /examples/print_tree.py | |
| parent | 7bbaf7e7cf131d83931bfda2d2e8e5d6ef1b235f (diff) | |
Consistently use 0/1/2 for tristate values
Easier to work with, allowing e.g. direct comparisons with < and >. Make
set_value() take 0, 1, 2 for bool and tristate symbols, and fix other
APIs to match.
Also:
- Add introductions to various concepts in the module docstring.
Document some more attributes. Still TODOs.
- Rename the Config class to Kconfig.
- Escape " and \ in the name of constant symbols when printing them.
Also make the (un)escaping 100% consistent with how the C tools do
it (\ before non-magic character should be unescaped too).
- Clean up the escaping/unescaping code and provide two public
escape()/unescape() functions.
- Export the original MODULES-independent type in orig_type. It's
needed for printing symbols in the reparsable __str__() Kconfig
format with just public APIs.
- Lots of other minor reorganizing and nits all over.
Diffstat (limited to 'examples/print_tree.py')
| -rw-r--r-- | examples/print_tree.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/print_tree.py b/examples/print_tree.py index 8d18ce9..9d9eac2 100644 --- a/examples/print_tree.py +++ b/examples/print_tree.py @@ -38,7 +38,7 @@ # config GENERIC_IRQ_PROBE # ... -from kconfiglib import Config, Symbol, Choice, MENU, COMMENT +from kconfiglib import Kconfig, Symbol, Choice, MENU, COMMENT import sys def indent_print(s, indent): @@ -63,5 +63,5 @@ def print_items(node, indent): node = node.next -conf = Config(sys.argv[1]) +conf = Kconfig(sys.argv[1]) print_items(conf.top_node, 0) |
