【问题标题】:Even after installing curses(pip install windows-curses) i am getting the error (curses function returned NULL)即使安装了curses(pip install windows-curses)我也得到了错误(curses函数返回NULL)
【发布时间】:2020-04-28 16:42:58
【问题描述】:
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint


curses.initscr()
win = curses.newwin(20, 60, 0, 0)
win.keypad(1)
curses.noecho()
curses.curs_set(0)
win.border(0)
win.nodelay(1)

这是我遇到的错误

win = curses.newwin(20, 60, 10, 10) _curses.error:curses 函数返回 NULL

【问题讨论】:

    标签: python-3.x python-curses


    【解决方案1】:

    您可能需要将编辑器切换为喜欢repl.it,或者您必须创建一个 IDLE 文件并在终端中运行它。

    【讨论】:

      猜你喜欢
      • 2022-08-06
      • 1970-01-01
      • 2017-03-12
      • 1970-01-01
      • 2021-12-23
      • 2018-09-25
      • 2015-04-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多