org.python.util
Class ReadlineConsole

java.lang.Object
  extended byorg.python.util.PythonInterpreter
      extended byorg.python.util.InteractiveInterpreter
          extended byorg.python.util.InteractiveConsole
              extended byorg.python.util.ReadlineConsole

public class ReadlineConsole
extends InteractiveConsole

Uses: Java Readline

Based on CPython-1.5.2's code module


Field Summary
 java.lang.String filename
           
 
Fields inherited from class org.python.util.InteractiveInterpreter
buffer
 
Constructor Summary
ReadlineConsole()
           
ReadlineConsole(PyObject locals)
           
ReadlineConsole(PyObject locals, java.lang.String filename)
           
 
Method Summary
static java.lang.String _raw_input(PyObject[] args, java.lang.String[] kws)
          Central point of dispatch to Readline library for all clients, whether the console itself or others like cmd.Cmd interpreters.
 java.lang.String raw_input(PyObject prompt)
          Write a prompt and read a line.
 
Methods inherited from class org.python.util.InteractiveConsole
getDefaultBanner, interact, interact, push
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

public java.lang.String filename
Constructor Detail

ReadlineConsole

public ReadlineConsole()

ReadlineConsole

public ReadlineConsole(PyObject locals)

ReadlineConsole

public ReadlineConsole(PyObject locals,
                       java.lang.String filename)
Method Detail

raw_input

public java.lang.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.

Overrides:
raw_input in class InteractiveConsole

_raw_input

public static java.lang.String _raw_input(PyObject[] args,
                                          java.lang.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


Jython homepage