

def shell(task, welcome_banner=None, prompt_text=None, prompt_color=None, prompt_symbol='>'):
    if prompt_color:
        prompt_text = Color.str(prompt_text, foreground=prompt_color)
    prompt = '{}{} '.format(((cmd.strip() + ' ') or ''), prompt_symbol)
    input = six.moves.input
    if welcome_banner:
        print(welcome_banner)
    print('(Use ctrl+c to quit)')
    while True:
        try:
            cmd = input(prompt)
        except KeyboardInterrupt:
            break
        else:
            try:
                task.dispatch(shlex.split(cmd))
            except SystemExit:
                pass
        finally:
            print('')

dataset/ETHPy150Open sodastsai/taskr/taskr/contrib/cli.py shell/VarMisuse@53/75 `prompt_text`->`cmd`