From c805e3143bada2df897927996ae23a469cf83eb3 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 6 Dec 2012 17:01:09 +0100 Subject: Move examples into separate directory. --- examples/eval_expr.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 examples/eval_expr.py (limited to 'examples/eval_expr.py') diff --git a/examples/eval_expr.py b/examples/eval_expr.py new file mode 100644 index 0000000..f8e0f65 --- /dev/null +++ b/examples/eval_expr.py @@ -0,0 +1,8 @@ +# Evaluates an expression in the context of a configuration. (Here we could +# load a .config as well.) + +import kconfiglib +import sys + +conf = kconfiglib.Config(sys.argv[1]) +print conf.eval("(TRACE_IRQFLAGS_SUPPORT || PPC32) && STACKTRACE_SUPPORT") -- cgit v1.2.3