#!/usr/bin/python import curses import meetups def printMenu(): scr.addstr("Event List Manager\n") scr.addstr("==================\n\n") scr.addstr("Select a command from the follwing list:\n") scr.addstr("i - Import Meetups\n") scr.addstr("l - List Meetups in files\n") scr.addstr("E - Exit\n") scr.addstr("\n"); scr = curses.initscr() curses.noecho() curses.cbreak() scr.keypad(1) printMenu(); exiting = False; while not exiting: c = scr.getch() if c == ord('E'): break elif c == ord('i'): meetups.importMeetups() scr.addstr("\n\n"); printMenu() elif c == ord('l'): meetups.createFiles() scr.addstr("\n\n"); printMenu() curses.nocbreak() scr.keypad(0) curses.echo() curses.endwin()