tmp_list = [] cow_list = os.listdir('/usr/share/cowsay/cows') for cow in cow_list: cow = cow.split('.')[:-1] cow = '.'.join(cow) tmp_list.append(cow) cow_list = tmp_list cow_list.sort() return PlainList(cow_list) ############ ## DATA ## ############ CONFIG = Config() SHELL = CONFIG.start_user_profile() LIST_OBJ = make_list_obj() MENU_FUNC = lambda: SHELL.list_menu(LIST_OBJ) ############ ## MAIN ## ############ def main(): """ Feed fortunes to the selected ASCII character. """ parse_help_flag() Cli() cow = '' message1 = define_text()
#!/usr/bin/env python """ Displays sytem info. Works with bash or Tk. """ __author__ = 'Chris Horn <*****@*****.**>' from cjh import cli from cjh.config import Config cli.Cli() CONFIG = Config() if __name__ == '__main__': SHELL = CONFIG.start_user_profile() #move mainloop statement into main( else: SHELL = cli.Cli() if SHELL.interface in ['wx', 'Tk']: SHELL.center_window(width_=475, height_=230) if SHELL.interface == 'Tk': #if type(SHELL) == 'cjh/tk_template.TkTemplate': SHELL.msg.config(bg='black', fg='chartreuse', font=('mono', 9), width=500) SHELL.main_window.config(bg='black') SHELL.main_window.title(cli.Cli.hostname) def main(): """ Output system info; if using bash, use animated text. """ if SHELL.interface == 'Tk': SHELL.view_info() SHELL.main_window.mainloop()