code: def start(self):
          
          self.window = _curses.initscr()
          _curses.savetty()
          _curses.start_color()
          _curses.use_default_colors()
          self.window.leaveok(1)
          _curses.raw()
          self.window.keypad(1)
          _curses.noecho()
          _curses.cbreak()
          _curses.nonl()
          _curses.curs_set(0)
          if self.blocking:
              self.window.nodelay(0)
          else:
              self.window.nodelay(1)
          self.running = True
          while self.running:
              self.cycle()
              if self.friendly and not self.blocking:
                  time.sleep(self.delay)
          self.stop()
docs: Window event loop