python.console, and
implementing interface Console. PlainConsole may be selected by the user
through that registry, and is the default console when the selected one fails to load. It will
also be installed by the Jython command-line application when in non-interactive mode.
Unlike some consoles, PlainConsole does not install a replacement for
System.in or System.out, or use a native library. It prompts on
System.out and reads from System.in (wrapped with the console
encoding).
org.python.core.RegistryKey#PYTHON_CONSOLE
| Modifier and Type | Field and Description |
|---|---|
| public final String | encoding
Encoding to use for line input. |
| public final Charset | encodingCharset
Encoding to use for line input as a |
| Access | Constructor and Description |
|---|---|
| public | PlainConsole(String
name of a supported encoding or encoding)null for
Charset.defaultCharset()Construct an instance of the console class specifying the character encoding. |
| Modifier and Type | Method and Description |
|---|---|
| public String | getEncoding()
Implements org. Name of the encoding, normally supplied during initialisation, and used for line input. |
| public Charset | getEncodingCharset()
Implements org. Accessor for encoding to use for line input as a |
| public void | install()
Implements org. Complete initialization and (optionally) install a stream object with line-editing as the
replacement for |
| public void |
| encoding | back to summary |
|---|---|
| public final String encoding Encoding to use for line input. | |
| encodingCharset | back to summary |
|---|---|
| public final Charset encodingCharset Encoding to use for line input as a | |
| PlainConsole | back to summary |
|---|---|
| public PlainConsole(String encoding) throws IllegalCharsetNameException, UnsupportedCharsetException Construct an instance of the console class specifying the character encoding. This encoding
must be one supported by the JVM. The PlainConsole does not replace
| |
| getEncoding | back to summary |
|---|---|
| public String getEncoding() Implements org. Doc from org. Name of the encoding, normally supplied during initialisation, and used for line input.
This may not be the cononoical name of the codec returned by | |
| getEncodingCharset | back to summary |
|---|---|
| public Charset getEncodingCharset() Implements org. Doc from org. Accessor for encoding to use for line input as a | |
| install | back to summary |
|---|---|
| public void install() Implements org. Doc from org. Complete initialization and (optionally) install a stream object with line-editing as the
replacement for
| |
| uninstall | back to summary |
|---|---|
| public void uninstall() throws UnsupportedOperationException Implements org. A
| |