# Pastebin RN82ya5s import os import sys bitbakelibs = os.path.join(os.path.dirname(os.environ["BBPATH"]), "meta", "poky", "bitbake", "lib") sys.path.append(bitbakelibs) import bb.tinfoil with bb.tinfoil.Tinfoil() as bbhandler: bbhandler.prepare(config_only=False, quiet=3) datastore = bbhandler.parse_recipe(sys.argv[1]) print("Definition:", datastore.getVar(sys.argv[2], False)) print("Result: ", datastore.getVar(sys.argv[2], True))