Package ghidra.pyghidra.interpreter

# Interface PyGhidraConsole

All Superinterfaces:
  `Disposable`

public interface PyGhidraConsole extends Disposable
Console interface providing only the methods which need to be implemented in Python. This interface is for internal use only and is only public so it can be implemented in Python.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<ghidra.app.plugin.core.console.CodeCompletion>`
  `getCompletions(String cmd, int caretPos)`
  Generates code completions for the PyGhidra interpreter
  `void`
  `interrupt()`
  Interrupts the code running in the PyGhidra console
  `void`
  `restart()`
  Restarts the PyGhidra console

  ### Methods inherited from interface ghidra.util.Disposable

  `dispose`

- ## Method Details

  - ### getCompletions

    List<ghidra.app.plugin.core.console.CodeCompletion> getCompletions(String cmd, int caretPos)
    Generates code completions for the PyGhidra interpreter
    Parameters:
      `cmd` - The command to get code completions for
      `caretPos` - The position of the caret in the input string 'cmd'. It should satisfy the constraint "0 <= caretPos <= cmd.length()"
    Returns:
      A `List` of `code completions` for the given command
    See Also:
      - `InterpreterConnection.getCompletions(String, int)`

  - ### restart

    void restart()
    Restarts the PyGhidra console

  - ### interrupt

    void interrupt()
    Interrupts the code running in the PyGhidra console