org.python.util

Class ReadlineConsole

public class ReadlineConsole extends InteractiveConsole

Uses: Java Readline

Based on CPython-1.5.2's code module

Field Summary
Stringfilename
Constructor Summary
ReadlineConsole()
ReadlineConsole(PyObject locals)
ReadlineConsole(PyObject locals, String filename)
Method Summary
Stringraw_input(PyObject prompt)
Write a prompt and read a line.
static String_raw_input(PyObject[] args, String[] kws)
Central point of dispatch to Readline library for all clients, whether the console itself or others like cmd.Cmd interpreters.

Field Detail

filename

public String filename

Constructor Detail

ReadlineConsole

public ReadlineConsole()

ReadlineConsole

public ReadlineConsole(PyObject locals)

ReadlineConsole

public ReadlineConsole(PyObject locals, String filename)

Method Detail

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. This subclass implements the functionality using JavaReadline.

_raw_input

public static String _raw_input(PyObject[] args, String[] kws)
Central point of dispatch to Readline library for all clients, whether the console itself or others like cmd.Cmd interpreters. Both of these uses come through here.

Parameters: args should contain a single prompt kws keywords

Returns: the user input