code: def main():
      
      # Set up curses.
      stdscr = curses.initscr()
      curses.start_color()
      curses.init_pair(1, foreground_colour, background_colour)
      curses.noecho()
      stdscr.keypad(True)
      stdscr.nodelay(True)
      try:
          curses.curs_set(False)
      except:
          pass
      try:
          # Run main event loop until quit.
          while True:
              try:
                  update_gunicorns()
                  handle_keypress(stdscr)
                  display_output(stdscr)
                  curses.napms(int(screen_delay * 1000))
              except KeyboardInterrupt:
                  break
      finally:
          # Tear down curses.
          curses.nocbreak()
          stdscr.keypad(False)
          curses.echo()
          curses.endwin()
docs: Main entry point for gunicorn_console.