summaryrefslogtreecommitdiff
path: root/examples/eval_expr.py
blob: f8e0f65a94a1a44257ae4bb32b28bd6faa5bc4fc (plain)
1
2
3
4
5
6
7
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")