Esempio n. 1
0
def send_file(_ui: UserInput) -> bool:
    """send_file()

    asks for a file name and invokes _send_specified_file
    """
    while 1:

        try:
            _ui.inputfn = input("file name to send to repeater?>")
            _send_specified_file(_ui)
            return True

        except OSError:
            print(f"{_ui.inputfn} not found")  # .format(_ui.inputfn))
            if input("Abort sendfile Y/N").lower().strip()[0:1] == 'y':
                return False
Esempio n. 2
0
def do_utility_cmds(_ui: UserInput) -> bool:
    """doUtilityCmds(ui)

    Asks for the log file name, opens the ui, and the controller.
    Calls the util processor loop,
    Closes the controller and the ui on exit
    """

    _ui.inputfn = input("input log file name.txt>")
    _ui.open()
    _c: Controller = Controller(_ui)
    _c.open()
    try:
        _utils: Utils = Utils(_ui, _c)
        _utils.process_loop()
    finally:
        _c.close()
        _ui.close()
    return True