【问题标题】:SCons Action Verbosity LevelsSCons 动作详细级别
【发布时间】:2014-06-19 10:08:10
【问题描述】:

鉴于我的 Ada 构建器使用了一个函数 ada_action,该函数由

static_obj.action(suffix, Action(ada_action, print_action_string)

目前调用env.Execute() 及更多

def print_action_string(target, source, env):
    print env.subst(env["ADACOMSTR"], target=target, source=source)

如何控制详细级别,以便在定义 env["ADACOMSTR"] 时只调用 print_action_string 并禁止回显当前由 env.Execute() 执行的 shell 命令?

【问题讨论】:

    标签: shell scons verbosity


    【解决方案1】:

    您通常不需要在构建器操作中使用 Execute()。也许如果您分享那段代码可能会有所帮助。您还可以考虑使用生成器,具体取决于您要查找的内容。

    【讨论】:

    • 好的,所以我想我应该在 shell 调用之前使用 Python 自己的内置 shell 命令并手动回显它(在我的情况下是标志 VERBOSE=on)?
    • 这听起来很合理。
    猜你喜欢
    • 2017-01-21
    • 1970-01-01
    • 2016-12-09
    • 1970-01-01
    • 2021-08-06
    • 2016-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多