public class InteractiveConsole extends InteractiveInterpreter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONSOLE_FILENAME |
java.lang.String |
filename |
buffer
Constructor and Description |
---|
InteractiveConsole() |
InteractiveConsole(PyObject locals) |
InteractiveConsole(PyObject locals,
java.lang.String filename) |
InteractiveConsole(PyObject locals,
java.lang.String filename,
boolean replaceRawInput) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDefaultBanner() |
void |
interact()
Closely emulate the interactive Python console.
|
void |
interact(java.lang.String banner,
PyObject file) |
boolean |
push(java.lang.String line)
Push a line to the interpreter.
|
java.lang.String |
raw_input(PyObject prompt)
Write a prompt and read a line from standard input.
|
java.lang.String |
raw_input(PyObject prompt,
PyObject file)
Write a prompt and read a line from a file.
|
interrupt, resetbuffer, runcode, runsource, runsource, runsource, showexception, write
cleanup, compile, compile, compile, compile, eval, eval, exec, exec, execfile, execfile, execfile, get, get, getLocals, getSystemState, initialize, set, set, setErr, setErr, setErr, setIn, setIn, setIn, setLocals, setOut, setOut, setOut, threadLocalStateInterpreter
public static final java.lang.String CONSOLE_FILENAME
public java.lang.String filename
public InteractiveConsole()
public InteractiveConsole(PyObject locals)
public InteractiveConsole(PyObject locals, java.lang.String filename)
public InteractiveConsole(PyObject locals, java.lang.String filename, boolean replaceRawInput)
replaceRawInput
- -
if true, we hook this Class's raw_input into the builtins
table so that clients like cmd.Cmd use it.public void interact()
public static java.lang.String getDefaultBanner()
public void interact(java.lang.String banner, PyObject file)
public boolean push(java.lang.String line)
public java.lang.String raw_input(PyObject prompt)