summaryrefslogtreecommitdiff
path: root/examples/allyesconfig.py
AgeCommit message (Collapse)Author
2018-05-30allyesconfig: Prepare for packagingUlf Magnusson
Move to the root, simplify a bit, provide an entry point function (for setuptools's entry_points).
2018-05-28Simplify allyesconfig.py example with Kconfig.choicesUlf Magnusson
Could do something similar to allnoconfig.py for the packaged version.
2017-11-20allno/yesconfig.py: Remove unused STR_TO_TRI importsUlf Magnusson
Leftovers
2017-11-06Refer to kconfiglib.py for iterative tree walkingUlf Magnusson
Turns out to be kinda awkward to implement print_tree.py iteratively, because the indent.
2017-11-06Clean up examples a bitUlf Magnusson
conf -> kconf, for consistency, plus various nits.
2017-11-06Simplify allyesconfig.pyUlf Magnusson
Can be implemented in a simpler/better way with Choice.assignable. Also rename 'conf' to 'kconf' in allnoconfig.py for consistency.
2017-11-05Simplify redundant 'is (not) None' tests in examplesUlf Magnusson
2017-10-31Handle choices more like the C implementationUlf Magnusson
Choice symbols get the choice itself propagated to the conditions of their properties. This works since the Symbol/Choice value interfaces are compatible now. Simplifies value calculations and makes .assignable work automagically for choice symbols in choices in any mode. One drawback is that a '&& <choice>' now shows up on conditions when printing choice symbols, which is not valid Kconfig. That should be easy to work around if needed at least.
2017-10-30Merge user_str/tri_value into user_valueUlf Magnusson
user_str_value isn't justified any more with the other API improvements. user_value now stores 0, 1, 2 for bool/tristate symbols, and a string for other symbol types. Much simpler and more intuitive. Also avoid printing quotes around tristate values in __repr__(). This was inconsistent too as it was only done for the value and user value. Should be getting close to final API.
2017-10-30Consistently use 0/1/2 for tristate valuesUlf Magnusson
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.
2017-10-28Nearly finalize APIUlf Magnusson
Probably just some usability tweaks left. Having to do STR_TO_TRI[] for comparisons against 'assignable' values is kinda ugly and confusing.
2017-10-25BackupUlf Magnusson
2017-10-24Kconfiglib 2 backupUlf Magnusson
WIP
2012-12-13Rename some APIs to be more consistent and intuitive.Ulf Magnusson
2012-12-11Rename APIs to be more consistent and intuitive.Ulf Magnusson
2012-12-08Clarify allno/yesconfig.py.Ulf Magnusson
2012-12-06Move examples into separate directory.Ulf Magnusson