def register(reg_signal=signal.SIGQUIT, reg_unhandled=True, commands=[]):
    """
    Registers exconsole hooks

    :param reg_signal: if not None, register signal handler (default: ``signal.SIGQUIT``)
    :param reg_unhandled: if ``True``, register unhandled exception hook (``sys.excepthook``)
    :param commands: list of custom commands/objects: (<local name>, <help string>, <function or object>)
    """
    if reg_signal:
        signal.signal(reg_signal, handle_quit)
    if reg_unhandled:
        sys.excepthook = handle_exception
    launch.commands = commands
Registers exconsole hooks

    :param reg_signal: if not None, register signal handler (default: ``signal.SIGQUIT``)
    :param reg_unhandled: if ``True``, register unhandled exception hook (``sys.excepthook``)
    :param commands: list of custom commands/objects: (<local name>, <help string>, <function or object>)