Package ghidra.pyghidra.interpreter

# Class PyGhidraInterpreter

java.lang.Object
ghidra.pyghidra.interpreter.PyGhidraInterpreter

All Implemented Interfaces:
  `ghidra.app.plugin.core.interpreter.InterpreterConnection`, `Disposable`

public final class PyGhidraInterpreter extends Object implements Disposable, ghidra.app.plugin.core.interpreter.InterpreterConnection
The PyGhidra interpreter connection

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final ghidra.app.plugin.core.interpreter.InterpreterConsole`
  `console`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PyGhidraInterpreter(PyGhidraPlugin plugin, boolean isPythonAvailable)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dispose()`
  Dispose this object
  `List<ghidra.app.plugin.core.console.CodeCompletion>`
  `getCompletions(String cmd)`
  `List<ghidra.app.plugin.core.console.CodeCompletion>`
  `getCompletions(String cmd, int caretPos)`
  `Icon`
  `getIcon()`
  `String`
  `getTitle()`
  `void`
  `init(PyGhidraConsole pythonSideConsole)`
  Initializes the interpreter with the provided PyGhidraConsole.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### console

    public final ghidra.app.plugin.core.interpreter.InterpreterConsole console

- ## Constructor Details

  - ### PyGhidraInterpreter

    public PyGhidraInterpreter(PyGhidraPlugin plugin, boolean isPythonAvailable)

- ## Method Details

  - ### dispose

    public void dispose()
    Description copied from interface: `Disposable`
    Dispose this object
    Specified by:
      `dispose` in interface `Disposable`

  - ### getIcon

    public Icon getIcon()
    Specified by:
      `getIcon` in interface `ghidra.app.plugin.core.interpreter.InterpreterConnection`

  - ### getTitle

    public String getTitle()
    Specified by:
      `getTitle` in interface `ghidra.app.plugin.core.interpreter.InterpreterConnection`

  - ### getCompletions

    public List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd)
    Specified by:
      `getCompletions` in interface `ghidra.app.plugin.core.interpreter.InterpreterConnection`

  - ### getCompletions

    public List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd, int caretPos)
    Specified by:
      `getCompletions` in interface `ghidra.app.plugin.core.interpreter.InterpreterConnection`

  - ### init

    public void init(PyGhidraConsole pythonSideConsole)
    Initializes the interpreter with the provided PyGhidraConsole. This method is for internal use only and is only public so it can be called from Python.
    Parameters:
      `pythonSideConsole` - the python side console
    Throws:
      `AssertException` - if the interpreter has already been initialized