Background:
- I recently installed curses with
pip install curses
- I found a couple tutorials online (https://www.devdungeon.com/content/curses-programming-python, https://docs.python.org/3/howto/curses.html, https://www.youtube.com/watch?v=rbasThWVb-c)
- I always constantly testrun my code when I install a new package or learn something new
Whenever I run s = curses.initscr()
in IDLE, I get this error message:
File "C:/Users/jacob/AppData/Local/Programs/Python/Python37-32/screentest.py", line 3, in <module>
s = curses.initscr()
File "C:\Users\jacob\AppData\Local\Programs\Python\Python37-32\lib\curses\__init__.py", line 30, in initscr
fd=_sys.__stdout__.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'
This is the message from PyCharm:
Redirection is not supported.
Process finished with exit code 1
And when I run a sample snippet from DevDungeon,
print("Preparing to initialize screen...")
screen = curses.initscr()
print("Screen initialized.")
screen.refresh()
curses.napms(2000)
curses.endwin()
print("Window ended.")
in command prompt with python booted, it just gives an uninteractable blank screen.
Is the thing happening in shell correct?
What the hell is going on?
How can I fix this?
please help thank you