什么是 CLI 循环?和普通循环有什么区别?

What is CLI-Loop ? What's the difference with normal loop?

我正在研究 Python。

我看到了这样的东西。

# Start CLI-Loop
while True:
    try:
        text = raw_input()
    except:
        text = error()

    if text == condition_1:
        do_Some_Other_Things_1()
        break

    elif text == condition_2:
        do_Some_Other_Things_2()

CLI-Loop 代表 "Command Line Interface Loop" 吗?

如果不是,那是什么意思?

它有什么特别之处?

CLI 确实代表命令行界面。这个循环没有什么特别的,它只是被称为 "the CLI loop" 来表示它是一个处理从命令行获取的输入的循环。

循环没有什么特别之处;作者简单介绍了代码块,说明它将解释命令。

这正是循环所做的;使用 raw_input(),它从终端请求用户输入,然后根据输入执行功能。换句话说,它接受命令,与用户交互。