org.python.util

Class JLineConsole


public class JLineConsole
extends InteractiveConsole

This class uses JLine to provide readline like functionality to its console without requiring native readline support.

Field Summary

Fields inherited from class org.python.util.InteractiveConsole

CONSOLE_FILENAME, filename

Fields inherited from class org.python.util.InteractiveInterpreter

buffer, filename

Constructor Summary

JLineConsole()
Create a new Interpreter with an empty dictionary
JLineConsole(PyObject locals)
Create a new interpreter with the given dictionary to use as its namespace
JLineConsole(PyObject locals, String filename)

Method Summary

String
raw_input(PyObject prompt)
Write a prompt and read a line.

Methods inherited from class org.python.util.InteractiveConsole

getDefaultBanner, interact, interact, push, raw_input

Methods inherited from class org.python.util.InteractiveInterpreter

interrupt, resetbuffer, runcode, runsource, runsource, runsource, showexception, write

Methods inherited from class org.python.util.PythonInterpreter

cleanup, eval, exec, exec, execfile, execfile, execfile, get, get, getLocals, initialize, set, set, setErr, setErr, setErr, setLocals, setOut, setOut, setOut

Constructor Details

JLineConsole

public JLineConsole()
Create a new Interpreter with an empty dictionary

JLineConsole

public JLineConsole(PyObject locals)
Create a new interpreter with the given dictionary to use as its namespace
Parameters:

JLineConsole

public JLineConsole(PyObject locals,
                    String filename)

Method Details

raw_input

public String raw_input(PyObject prompt)
Write a prompt and read a line. The returned line does not include the trailing newline. When the user enters the EOF key sequence, EOFError is raised. The base implementation uses the built-in function raw_input(); a subclass may replace this with a different implementation.
Overrides:
raw_input in interface InteractiveConsole

Jython homepage