def main():
<EOL>stdscr = curses.initscr()<EOL>curses.start_color()<EOL>curses.init_pair(<NUM_LIT:1>, foreground_colour, background_colour)<EOL>curses.noecho()<EOL>stdscr.keypad(True)<EOL>stdscr.nodelay(True)<EOL>try:<EOL><INDENT>curses.curs_set(False)<EOL><DEDENT>except:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>while True:<EOL><INDENT>try:<EOL><INDENT>update_gunicorns()<EOL>handle_keypress(stdscr)<EOL>display_output(stdscr)<EOL>curses.napms(int(screen_delay * <NUM_LIT:1000>))<EOL><DEDENT>except KeyboardInterrupt:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>finally:<EOL><INDENT>curses.nocbreak()<EOL>stdscr.keypad(False)<EOL>curses.echo()<EOL>curses.endwin()<EOL><DEDENT>
Main entry point for gunicorn_console.