# lmbelo/pyscripter architecture

> Architecture diagram of the GitHub repository lmbelo/pyscripter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lmbelo/pyscripter
- Repository: https://github.com/lmbelo/pyscripter

## Overview

PyScripter is a Windows Python IDE. Its user-facing workflow is editing Python code, configuring and running it in a Python engine, then inspecting output or debugging state. The tree and help-topic index also indicate project/file navigation, language services, tests, and LLM assistance. The supplied source excerpts do not include the Delphi application modules, so most implementation links below are marked unverified; the separate dataframe inspector is represented from its excerpt.

Main entry points: [`Source/frmPyIDEMain.pas`](https://github.com/lmbelo/pyscripter/blob/master/Source/frmPyIDEMain.pas) (IDE Shell), [`Source/frmEditor.pas`](https://github.com/lmbelo/pyscripter/blob/master/Source/frmEditor.pas) (Code Editor), [`Source/cInternalPython.pas`](https://github.com/lmbelo/pyscripter/blob/master/Source/cInternalPython.pas) (Python Engine), [`Source/cPyDebugger.pas`](https://github.com/lmbelo/pyscripter/blob/master/Source/cPyDebugger.pas) (Debugger)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["IDE Workspace"]
  node_ide["IDE Shell<br/>[frmPyIDEMain.pas]"]
  node_codeexplorer["Code Explorer"]
  node_projects["Project Explorer"]
  node_fileexplorer["File Explorer"]
end

subgraph group_authoring["Code Authoring"]
  node_editor["Code Editor<br/>[frmEditor.pas]"]
  node_completion["Code Assistance"]
  node_search["Search and Refactor<br/>[cFindInFiles.pas]"]
  node_lsp["Language Server<br/>[cLSPClients.pas]"]
  node_jedi["Jedi LSP Launcher"]
end

subgraph group_execution["Execution and Debugging"]
  node_python["Python Engine"]
  node_runconfig["Run Configuration"]
  node_output["Command Output"]
  node_debugger["Debugger<br/>[cPyDebugger.pas]"]
  node_remote_debugger["Remote Debugger"]
  node_variables["State Inspectors<br/>[frmVariables.pas]"]
  node_tests["Unit Testing<br/>[frmUnitTests.pas]"]
end

subgraph group_extensions["IDE Extensions"]
  node_llm["LLM Assistant<br/>[frmLLMChat.pas]"]
  node_dataframe["Dataframe Inspector<br/>[main.py]"]
end

node_user(("Developer"))

node_user -->|"uses"| node_ide
node_ide -.->|"opens editor"| node_editor
node_ide -.->|"navigates projects"| node_projects
node_ide -.->|"browses files"| node_fileexplorer
node_editor -.->|"offers completion"| node_completion
node_editor -.->|"requests language services"| node_lsp
node_lsp -.->|"launches server"| node_jedi
node_editor -.->|"supports search"| node_search
node_ide -.->|"configures runs"| node_runconfig
node_ide -.->|"runs code"| node_python
node_python -.->|"emits output"| node_output
node_python -.->|"supports debugging"| node_debugger
node_debugger -.->|"offers remote debugging"| node_remote_debugger
node_debugger -.->|"exposes runtime state"| node_variables
node_ide -.->|"runs tests"| node_tests
node_ide -.->|"offers assistance"| node_llm

click node_ide "https://github.com/lmbelo/pyscripter/blob/master/Source/frmPyIDEMain.pas"
click node_editor "https://github.com/lmbelo/pyscripter/blob/master/Source/frmEditor.pas"
click node_completion "https://github.com/lmbelo/pyscripter/blob/master/Source/cCodeCompletion.pas"
click node_codeexplorer "https://github.com/lmbelo/pyscripter/blob/master/Source/frmCodeExplorer.pas"
click node_projects "https://github.com/lmbelo/pyscripter/blob/master/Source/frmProjectExplorer.pas"
click node_fileexplorer "https://github.com/lmbelo/pyscripter/blob/master/Source/frmFileExplorer.pas"
click node_search "https://github.com/lmbelo/pyscripter/blob/master/Source/cFindInFiles.pas"
click node_lsp "https://github.com/lmbelo/pyscripter/blob/master/Source/cLSPClients.pas"
click node_jedi "https://github.com/lmbelo/pyscripter/blob/master/Lib/Lsp/jls/run-jedi-language-server.py"
click node_python "https://github.com/lmbelo/pyscripter/blob/master/Source/cInternalPython.pas"
click node_runconfig "https://github.com/lmbelo/pyscripter/blob/master/Source/dlgRunConfiguration.pas"
click node_output "https://github.com/lmbelo/pyscripter/blob/master/Source/frmCommandOutput.pas"
click node_debugger "https://github.com/lmbelo/pyscripter/blob/master/Source/cPyDebugger.pas"
click node_remote_debugger "https://github.com/lmbelo/pyscripter/blob/master/Source/cPyRemoteDebugger.pas"
click node_variables "https://github.com/lmbelo/pyscripter/blob/master/Source/frmVariables.pas"
click node_tests "https://github.com/lmbelo/pyscripter/blob/master/Source/frmUnitTests.pas"
click node_llm "https://github.com/lmbelo/pyscripter/blob/master/Source/frmLLMChat.pas"
click node_dataframe "https://github.com/lmbelo/pyscripter/blob/master/Lib/Variable%20Inspectors/dataframe/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ide,node_codeexplorer,node_projects,node_fileexplorer toneBlue
class node_editor,node_completion,node_search,node_lsp,node_jedi toneAmber
class node_python,node_runconfig,node_output,node_debugger,node_remote_debugger,node_variables,node_tests toneMint
class node_llm,node_dataframe toneRose
class node_user toneIndigo
```

## Components

### IDE Workspace

- [IDE Shell](https://github.com/lmbelo/pyscripter/blob/master/Source/frmPyIDEMain.pas): `Source/frmPyIDEMain.pas`
- [Code Explorer](https://github.com/lmbelo/pyscripter/blob/master/Source/frmCodeExplorer.pas): `Source/frmCodeExplorer.pas`
- [Project Explorer](https://github.com/lmbelo/pyscripter/blob/master/Source/frmProjectExplorer.pas): `Source/frmProjectExplorer.pas`
- [File Explorer](https://github.com/lmbelo/pyscripter/blob/master/Source/frmFileExplorer.pas): `Source/frmFileExplorer.pas`

### Code Authoring

- [Code Editor](https://github.com/lmbelo/pyscripter/blob/master/Source/frmEditor.pas): `Source/frmEditor.pas`
- [Code Assistance](https://github.com/lmbelo/pyscripter/blob/master/Source/cCodeCompletion.pas): `Source/cCodeCompletion.pas`
- [Search and Refactor](https://github.com/lmbelo/pyscripter/blob/master/Source/cFindInFiles.pas): `Source/cFindInFiles.pas`
- [Language Server](https://github.com/lmbelo/pyscripter/blob/master/Source/cLSPClients.pas): `Source/cLSPClients.pas`
- [Jedi LSP Launcher](https://github.com/lmbelo/pyscripter/blob/master/Lib/Lsp/jls/run-jedi-language-server.py): `Lib/Lsp/jls/run-jedi-language-server.py`

### Execution and Debugging

- [Python Engine](https://github.com/lmbelo/pyscripter/blob/master/Source/cInternalPython.pas): `Source/cInternalPython.pas`
- [Run Configuration](https://github.com/lmbelo/pyscripter/blob/master/Source/dlgRunConfiguration.pas): `Source/dlgRunConfiguration.pas`
- [Command Output](https://github.com/lmbelo/pyscripter/blob/master/Source/frmCommandOutput.pas): `Source/frmCommandOutput.pas`
- [Debugger](https://github.com/lmbelo/pyscripter/blob/master/Source/cPyDebugger.pas): `Source/cPyDebugger.pas`
- [Remote Debugger](https://github.com/lmbelo/pyscripter/blob/master/Source/cPyRemoteDebugger.pas): `Source/cPyRemoteDebugger.pas`
- [State Inspectors](https://github.com/lmbelo/pyscripter/blob/master/Source/frmVariables.pas): `Source/frmVariables.pas`
- [Unit Testing](https://github.com/lmbelo/pyscripter/blob/master/Source/frmUnitTests.pas): `Source/frmUnitTests.pas`

### IDE Extensions

- [LLM Assistant](https://github.com/lmbelo/pyscripter/blob/master/Source/frmLLMChat.pas): `Source/frmLLMChat.pas`
- [Dataframe Inspector](https://github.com/lmbelo/pyscripter/blob/master/Lib/Variable%20Inspectors/dataframe/main.py): `Lib/Variable Inspectors/dataframe/main.py`

### Other components

- **Developer**

## Connections

- Developer → IDE Shell: uses (evidence: `README.md`)
- IDE Shell → Code Editor: opens editor
- IDE Shell → Project Explorer: navigates projects
- IDE Shell → File Explorer: browses files
- Code Editor → Code Assistance: offers completion
- Code Editor → Language Server: requests language services
- Language Server → Jedi LSP Launcher: launches server
- Code Editor → Search and Refactor: supports search
- IDE Shell → Run Configuration: configures runs
- IDE Shell → Python Engine: runs code
- Python Engine → Command Output: emits output
- Python Engine → Debugger: supports debugging
- Debugger → Remote Debugger: offers remote debugging
- Debugger → State Inspectors: exposes runtime state
- IDE Shell → Unit Testing: runs tests
- IDE Shell → LLM Assistant: offers assistance
