public interface Console
python.console must implement this
interface, and provide a constructor with a single String argument, to be acceptable
during initialization of the interpreter. The argument to the constructor names the encoding in
use on the console. Such a class may provide line editing and history recall to an interactive
console. A default implementation (that does not provide any such facilities) is available as
PlainConsole.| Modifier and Type | Method and Description |
|---|---|
String |
getEncoding()
Name of the encoding, normally supplied during initialisation, and used for line input.
|
Charset |
getEncodingCharset()
Accessor for encoding to use for line input as a
Charset. |
void |
install()
Complete initialization and (optionally) install a stream object with line-editing as the
replacement for
System.in. |
void |
uninstall()
Uninstall the Console (if possible).
|
void install()
throws IOException
System.in.IOException - in case of failure related to i/ovoid uninstall()
throws UnsupportedOperationException
System.in should put back the original value.UnsupportedOperationException - if the Console cannot be uninstalledString getEncoding()
getEncodingCharset().Charset getEncodingCharset()
Charset.