This module provides a simple interface for KPs that would like to use the simpleio plugin for their console I/O if available, falling back to the KSS console. This is mostly useful for interactive demos (a simpleio window looks a bit nicer than a standard shell window).
This module defines the following functions:
The kos argument must be the KOS bastion passed to the KP's __main__() method.
The optional use_dev argument specifies a preference for the style I/O mechanism. If specified, it should be one of the strings 'X', 'tty' or 'null'. If 'null' is specified, an instance of the class null_io_mechanism above is returned. If 'tty' is specified, an instance of the class tty_io_mechanism above is returned. Otherwise, and in the default case, an attempt is made to connect to the current kernel's simpleio plugin, and if successful, an interface to a (new) console window created by that plugin is returned; if the plugin is not configured or does not respond, an instance of the class tty_io_mechanism above is returned.
The optional height and width arguments specify the size of the window (in lines and characters) created by the simpleio plugin. By default, a very large window is created. They are ignored for other device types.