def app_main(): action = sys.argv[1] if sys.argv[1:] else None if action == 'load': savename = sys.argv[2] save.load_game(savename) elif action == 'connect': host, port, username = sys.argv[2:] save.connect(host, int(port), username) elif action == 'eval': exec sys.argv[2] in globals() elif action == 'loadmeet': savename = sys.argv[2] ident = int(sys.argv[3]) def callback(): client.freeciv.func.py_init_meeting(ident) save.load_game(savename, callback) elif action == 'help': import help help.show() else: if action: print 'unknown action %r, see lib/main.py for actions' % action menus.main_menu()
def app_main(): action = sys.argv[1] if sys.argv[1:] else None if action == "load": savename = sys.argv[2] save.load_game(savename) elif action == "connect": host, port, username = sys.argv[2:] save.connect(host, int(port), username) elif action == "eval": exec sys.argv[2] in globals() elif action == "loadmeet": savename = sys.argv[2] ident = int(sys.argv[3]) def callback(): client.freeciv.func.py_init_meeting(ident) save.load_game(savename, callback) elif action == "help": import help help.show() else: if action: print "unknown action %r, see lib/main.py for actions" % action menus.main_menu()
def start(): if len(sys.argv) > 1 and sys.argv[1] in arguments: find_file() command = sys.argv[1] if command in 'auth': auth() elif command in 'upload': abspath = os.getcwd().split('/')[-1].lower() file_name = "".join([abspath, '.zip']) get_archive(file_name, '.') upload_file(file_name) elif command in 'download': file_name = raw_input('Enter your environment name (example: myenv.zip): ').lower() download_file(file_name) extract_archive(file_name) else: help.show()
def show_help(): help.show()
def show_help_screen(): data.load_menu_help_data() options_animation(True) help.show()