# # Load settings # # print "opening config file..." config = ConfigParser.ConfigParser() config_file = get_config_file() with open(config_file, 'r') as configfile: config.read(config_file) cc_user = config.get('DEFAULT', 'cc_user') cc_key = config.get('DEFAULT', 'cc_key') if cc_user == None or cc_key == None: print "user data configuration not set. Please run config program." api = CodecookApi() api.configure(cc_user, cc_key) # print "configuration loaded." # # Start command line UI # def exit_on_q(key): if key in ( 'q', 'Q', 'esc', ): raise urwid.ExitMainLoop()