samson
samson

Reputation: 1

Even after installing curses(pip install windows-curses) i am getting the error (curses function returned NULL)

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)

this is the error i am getting

win = curses.newwin(20, 60, 10, 10) _curses.error: curses function returned NULL

Upvotes: 0

Views: 555

Answers (1)

qiweunvjah
qiweunvjah

Reputation: 142

You might have to switch editors to like repl.it or you'll have to make an IDLE file and run that in the terminal.

Upvotes: 1

Related Questions