Package gda.jython
Class GDAInteractiveConsole
java.lang.Object
org.python.util.PythonInterpreter
org.python.util.InteractiveInterpreter
org.python.util.InteractiveConsole
gda.jython.GDAInteractiveConsole
public class GDAInteractiveConsole
extends org.python.util.InteractiveConsole
Class that overrides InteractiveConsole to allow customisation
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassClass to act as sys.stdin in Jython. -
Field Summary
Fields inherited from class org.python.util.InteractiveConsole
CONSOLE_FILENAME, filenameFields inherited from class org.python.util.InteractiveInterpreter
bufferFields inherited from class org.python.util.PythonInterpreter
cflags, systemState, threadLocals -
Constructor Summary
ConstructorsConstructorDescriptionGDAInteractiveConsole(org.python.core.PyObject locals, org.python.core.PySystemState pySystemState) -
Method Summary
Modifier and TypeMethodDescriptionorg.python.core.PyObjectraw_input(org.python.core.PyObject prompt) Read a line of user input.booleanRun the given command in the Jython interpreter after running it through the translator.voidsetIn(InputStream inStream) voidshowexception(org.python.core.PyException arg0) Show syntax error messages in the Terminal This is to work around an apparent bug in jython.Methods inherited from class org.python.util.InteractiveConsole
getDefaultBanner, interact, interact, push, raw_inputMethods inherited from class org.python.util.InteractiveInterpreter
interrupt, resetbuffer, runcode, runsource, runsource, writeMethods inherited from class org.python.util.PythonInterpreter
cleanup, compile, compile, compile, compile, eval, exec, exec, execfile, execfile, execfile, get, get, getLocals, getSystemState, initialize, set, set, setErr, setErr, setErr, setIn, setIn, setLocals, setOut, setOut, setOut, setSystemState, threadLocalStateInterpreter
-
Constructor Details
-
GDAInteractiveConsole
public GDAInteractiveConsole(org.python.core.PyObject locals, org.python.core.PySystemState pySystemState)
-
-
Method Details
-
showexception
public void showexception(org.python.core.PyException arg0) Show syntax error messages in the Terminal This is to work around an apparent bug in jython. showexception will print to the terminal for ordinary stuff, just not PySyntaxErrors. log as error as it is an exception Only show cause as a single line on teh Jython console- Overrides:
showexceptionin classorg.python.util.InteractiveInterpreter
-
eval
- Overrides:
evalin classorg.python.util.PythonInterpreter
-
setIn
- Overrides:
setInin classorg.python.util.PythonInterpreter
-
runsource
Run the given command in the Jython interpreter after running it through the translator.- Overrides:
runsourcein classorg.python.util.InteractiveInterpreter- See Also:
-
raw_input
Read a line of user input.Overrides the default raw_input to allow different InputStreams to be specified when running a command
- Overrides:
raw_inputin classorg.python.util.InteractiveConsole
-