def addstr(self, y, x, s, attr=curses.A_NORMAL): try: self.w.addstr(y, x, s, attr) except Exception as e: if str(e) != 'addstr() returned ERR': raise