def loop(params):

    display.welcome()

    try:

        while not params.user:
            params.user = getpass.getpass(prompt='User(Email): ', stream=None)

            # only prompt for password when no device token
        while not params.password:
            params.password = getpass.getpass(prompt='Password: ', stream=None)

            # if commands are provided, execute those then exit
        if params.commands:
            runcommands(params)
            goodbye()

        if params.debug: print('Params: ' + str(params))

        # start with a sync download
        if not params.command:
            params.command = 'd'

        # go into interactive mode
        while True:
            if not params.command:
                try:
                    params.command = input("Keeper > ")
                except KeyboardInterrupt:
                    print('')
                except EOFError:
                    raise KeyboardInterrupt

            try:
                if not do_command(params):
                    raise KeyboardInterrupt
            except CommunicationError as e:
                print("Communication Error:" + str(e.message))
            except AuthenticationError as e:
                print("AuthenticationError Error: " + str(e.message))
            except KeyboardInterrupt as e:
                raise
            except:
                print('An unexpected error occurred: ' + str(sys.exc_info()[0]))
                raise

            params.command = ''

    except __HOLE__:
        goodbye()
dataset/ETHPy150Open Keeper-Security/Commander/keepercommander/cli.py/loop