0

I downloaded and installed unicurses and when I write into python idle "import unicurses", it works without error. Then I write:

stdscr = initscr()

And then a name error occurs:

NameError: name 'initscr' is not defined

Everywhere I look in the internet for an unicurses tutorial, there is always explained that one has to start with "stdscr = initscr()", and there is no implication that it won't work when "import unicurses" had no problem.

For example here: https://medium.com/@vworri/terminal-based-ui-python-unicurses-561f94d8250c

Or here: https://www.youtube.com/watch?v=4s_wHUNCHK0&list=PL1H1sBF1VAKXLJ3cHisqjy4nGYDMqYIzo&index=2

What am I doing wrong, so that this NameError occurs?

Thank you very much Greetings cs_question_asker

  • 2
    That article is over 4 years old and that video is over 8 years old. Could very well be outdated information. Unicurses seems pretty old, you might just try using `curses` which is now officially included with Python. – Random Davis Aug 20 '21 at 22:17
  • try something like [`python3.9 -m pip install uni-curses`](https://github.com/unicurses/unicurses) – Giorgos Xou Oct 24 '21 at 21:15

0 Answers0