Skip to content

pyside6-scintilla

CI PyPI Downloads License: MIT Python versions

Permissively-licensed PySide6 bindings for the Scintilla code editor component.

View on PyPI · View on GitHub

Status

See GitHub Issues for what's done and what's next, and the project board for the joint roadmap with lexilla-py (issues and PRs from both repos are added to it automatically).

Installation

Install from PyPI:

pip install pyside6-scintilla

PySide6-Essentials 6.10+ is installed automatically as a dependency; the wheels bundle everything else ScintillaEditBase needs at runtime. Essentials provides the whole PySide6 import namespace — only QtCore, QtGui and QtWidgets are used here, so the ~175 MB of PySide6-Addons (Qt WebEngine, Qt3D, QtCharts …) is left out. Install PySide6 yourself if you want them.

Usage

from PySide6.QtWidgets import QApplication
from pyside6_scintilla import ScintillaEdit

app = QApplication([])
editor = ScintillaEdit()
editor.setText("hello, world")
editor.show()
app.exec()

ScintillaEdit exposes a typed method per Scintilla message (e.g. setText(), textLength(), gotoLine()) on top of ScintillaEditBase's raw .send()/.sends() message API — the same SCI_* messages as the C interface, not a QScintilla-style high-level API. See the examples gallery for complete examples of both.

Why this exists

The standard way to use Scintilla from Python + Qt is QScintilla — but it's a PyQt6 binding with no PySide6 equivalent, and it's GPLv3 or commercially licensed. Scintilla itself is licensed under the permissive HPND license. This project exposes that permissive core directly to PySide6 users — see Project mission for the full background.

Development

See the Development section for how the bindings are built, how to set up a local build, and how the vendored Scintilla source is verified against upstream.