The Notice Plugin

Python

notice.py - A plugin for Gate One that adds an escape sequence handler that will tell the client browser to display a message whenever said escape sequence is encountered. Any terminal program can emit the following escape sequence to display a message in the browser:

\x1b]_;notice|<the message>\x07

Very straightforward and also very powerful.

Hooks

This Python plugin file implements the following hooks:

hooks = {
    'Escape': notice_esc_seq_handler,
}

Docstrings

notice.notice_esc_seq_handler(self, message, term=None, multiplex=None)[source]

Handles text passed from the special optional escape sequance handler to display a message to the connected client (browser). It can be invoked like so:

$ echo -e "\033]_;notice|Text passed to some_function()\007"

See also

app_terminal.TerminalApplication.opt_esc_handler and terminal.Terminal._opt_handler()