def application_console_endpoint():
    diesel.sleep(1)
    try:
        session = RemoteConsoleService('localhost', port)
    except diesel.ClientConnectionError:
        diesel.log.error('Failed to connect to local console')
    else:
        diesel.log.warning('Connected to local console')
        with session:
            while True:
                try:
                    session.handle_command()
                except diesel.ClientConnectionClosed:
                    diesel.log.warning('Disconnected from local console')
                    break
Connects to the console UI and runs until disconnected.
dataset/ETHPy150Open dieseldev/diesel/diesel/console.py/application_console_endpoint