Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def check_environment_message(env):
    te = type(env)
    if not te is types.DictType:
        return (False, "environment must be dictionary, not "+te.__name__)
    for k in env.keys():
        # check environment entries with one dot starting whiff.x -- they should be listed in this module (whiff.x.y might be ok).
        if k.startswith("whiff.") and len(k.split("."))<3:
            test = VALID_KEYS.get(k)
            if test is None:
                return (False, "unknown whiff environment require "+repr((k,VALID_KEYS.keys())))
            #pr "   require", k, "ok"
    return (True, "environment ok") # a-ok
        


src/w/h/whiff-1.1/whiff/parseTemplate.py   whiff(Download)
            (success, result, nextcursor) = parse_json_descriptor(inString, cursor)
            if success:
                (test, message) = whiffenv.check_environment_message(result)
                if not test:
                    return (False, message, cursor)
    error_prologue = "parsing after identifier "+repr(token.strip())+" --  "+error_prologue
    if success:
        (test, message) = whiffenv.check_environment_message(result)
        if not test:
            return (False, error_prologue+" parsing json environment spec to '/}}' "+message, cursor)