def start(services=(), io=None):

    io = io or loop()
    for svc in services:
        svc.start()

    try:
        normal = True
        io.start()
    except KeyboardInterrupt:
        logging.info('Received keyboard interrupt.')
    except Exception:
        normal = False

    logging.info('Shutting down services.')
    for svc in services:
        try:
            svc.stop()
        except:
            logging.exception('Error while shutting down %r.' % svc)

    if normal:
        logging.info('Shutting down event loop.')
        io.stop()
    else:
        logging.exception('Uncaught exception')
        raise


### Pending bugfix
Create new Style instance.
dataset/ETHPy150Open HenryHu/pybbs/xmpp/aio.py/start--crossover with--dataset/ETHPy150Open jonathanslenders/ptpython/ptpython/python_input.py/PythonInput._generate_style