【问题标题】:Why am I getting the "Clear screen capability required" when spawning screen with TERM=dumb?为什么在使用 TERM=dumb 生成屏幕时会出现“需要清除屏幕功能”?
【发布时间】:2021-02-11 23:28:34
【问题描述】:

这就是我生成 pexpect 模块的方式。

os.environ["TERM"] = "dumb"
child = pexpect.spawn(
  '/usr/bin/screen -S idle nodejs botxxx/{}'.format(session["username"]+".js"),
  encoding='utf-8', env = {"TERM": "dumb"}, dimensions=(200, 200))

我正在查看 pexpect 输出 ---> 需要清除屏幕功能。 我该如何解决这个问题?

【问题讨论】:

    标签: python-3.x pexpect


    【解决方案1】:

    GNU screen 处理 pty,它需要更强大的终端类型。所以将dumb 替换为xterm 之类的东西。

    $ TERM=dumb screen -S tmp
    Clear screen capability required.
    

    【讨论】:

    • 你说有效。发生了不同的问题。我编辑了这个问题。这会导致问题吗?
    • 这不是 SO 的工作方式。当您通过询问另一个 Q 来更新您的 Q 时,您实际上是在使接受的答案无效。请回滚并问一个新的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-06-24
    • 2015-03-04
    • 2019-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-04-15
    相关资源
    最近更新 更多