java.lang.Object | |
↳ | com.pnfsoftware.jeb.client.script.JebPythonInterpreter |
Python interpreter using Jython.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
JebPythonInterpreter(File scriptsDir, IClientContext ctx)
Create a Python command interpreter able to interact with JEB objects.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean | addToSystemPath(File dir) | ||||||||||
AutocompletionResult |
autoComplete(String command)
Provide a best-effort completion suggestion for the provided partial command.
| ||||||||||
ExecutionResult |
executeCommand(String command)
Execute a command.
| ||||||||||
ExecutionResult | executeInternal(String command, boolean allowAutoImport) | ||||||||||
Collection<String> | getAutoImportedTypes() | ||||||||||
String |
getBanner()
Retrieve the interpreter's banner/logo string.
| ||||||||||
String |
getDescription()
Get the long name or description.
| ||||||||||
String |
getName()
Get the (short) name of this interpreter.
| ||||||||||
TypeInfoProvider | getTypeInfoProvider() | ||||||||||
void | injectObject(String name, Object value) | ||||||||||
boolean | isAllowAutoImport() | ||||||||||
void |
prepare()
Interpreters may place resource intensive preparation operations here.
| ||||||||||
void | setAllowAutoImport(boolean allowAutoImport) | ||||||||||
void | setTypeInfoProvider(TypeInfoProvider typeinfoprv) | ||||||||||
boolean |
shouldDisplayRawResults()
Determine whether this interpreter prefers that the results of
executed commands be printed as-is. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.util.interpreter.ICommandInterpreter
|
Create a Python command interpreter able to interact with JEB objects.
scriptsDir | optional scripts directory, will be added to the interpreter's
sys.path for easy import |
---|---|
ctx | optional JEB context - if provided, the context object will be made available as a global variable `jeb` |
Exception | |
---|---|
JebException |
Provide a best-effort completion suggestion for the provided partial command.
Retrieve the interpreter's banner/logo string.
Get the long name or description.
Get the (short) name of this interpreter.
Interpreters may place resource intensive preparation operations here. Clients may optionally
call this method before invoking either: executeCommand(String)
or
autoComplete(String)
. Clients may decide to not call thsi method. An interpreter
implementation must handle cases where prepare() is never called, sometimes called, called
multiple times, etc.
Determine whether this interpreter prefers that the results of executed commands
be printed as-is. Clients decide whether or not they want to follow this
guideline.