def run(): """ Main entry point of the application """ version = get_version() args = parse_arguments() IO.initialize(args.colorless) IO.print(get_main_banner(version)) if not is_linux(): IO.error('run under linux.') return if not is_privileged(): IO.error('run as root.') return args = process_arguments(args) if args is None: return if initialize(args.interface): IO.spacer() menu = MainMenu(version, args.interface, args.gateway_ip, args.gateway_mac, args.netmask) menu.start() cleanup(args.interface)
def _clear_handler(self, args): """ Handler for the 'clear' command-line argument Clears the terminal window and re-prints the banner """ IO.clear() IO.print(get_main_banner(self.version)) self._print_help_reminder()