Feb-28-2018, 12:34 AM
so Ive written a program, using the curses module to open a window, however when I run it I get an error message:
im using python 3.6, and running it on OSX 10.13.3
Error:Traceback (most recent call last):
File "/Users/alex/Documents/Programming things/game.py", line 10, in <module>
s = curses.initscr()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/curses/__init__.py", line 30, in initscr
fd=_sys.__stdout__.fileno())
_curses.error: setupterm: could not find terminal
the first few lines of the program, where the problem lies, are:import random import curses s = curses.initscr() curses.curs_set(0) sh, sw = s.getmaxyx() window = curses.newwin(sh, sw, 0,0) window.keypad(1) window.timeout(100)unless ive just missed something, (im fairly new to python, so this is very possible) I can't see whats gone wrong, and why it fails to find the terminal.
im using python 3.6, and running it on OSX 10.13.3