def interactive(argv):
    '\n    interactive\n        进入交互模式，减少按键次数（\n    '
    import shlex
    import traceback
    helpcmds(interactive_cmds)
    errorlevel = None
    try:
        import readline
    except ImportError:
        pass
    while True:
        try:
            if (device is None):
                prompt = 'akhelper> '
            else:
                prompt = ('akhelper %s> ' % str(device))
            cmdline = input(prompt)
            argv = shlex.split(cmdline)
            if ((len(argv) == 0) or (argv[0] == '?') or (argv[0] == 'help')):
                print(' '.join((x.__name__ for x in interactive_cmds)))
                continue
            elif (argv[0] == 'exit'):
                break
            cmd = match_cmd(argv[0], interactive_cmds)
            if (cmd is not None):
                with _alarm_context_factory():
                    errorlevel = cmd(argv)
        except EOFError:
            print('')
            break
        except (Exception, KeyboardInterrupt) as e:
            errorlevel = e
            traceback.print_exc()
            continue
    return errorlevel
interactive
    进入交互模式，减少按键次数（
def interactive(argv):
    '\n    interactive\n        进入交互模式，减少按键次数（\n    '
    import shlex
    import traceback
    helpcmds(interactive_cmds)
    errorlevel = None
    try:
        import readline
    except ImportError:
        pass
    while True:
        try:
            if (device is None):
                prompt = 'akhelper> '
            else:
                prompt = ('akhelper %s> ' % str(device))
            cmdline = input(prompt)
            argv = shlex.split(cmdline)
            if ((len(argv) == 0) or (argv[0] == '?') or (argv[0] == 'help')):
                print(' '.join((x.__name__ for x in interactive_cmds)))
                continue
            elif (argv[0] == 'exit'):
                break
            cmd = match_cmd(argv[0], interactive_cmds)
            if (cmd is not None):
                with _alarm_context_factory():
                    errorlevel = cmd(argv)
        except EOFError:
            print()
            break
        except (Exception, KeyboardInterrupt) as e:
            errorlevel = e
            traceback.print_exc()
            continue
    return errorlevel