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, the project board for the roadmap, and the changelog for releases. pyside6-scintilla lives in the scintilla-py repo, next to lexilla.

Installation

Install from PyPI:

pip install pyside6-scintilla

PySide6-Essentials 6.12.x is installed automatically as a dependency; the wheels bundle everything else ScintillaEditBase needs at runtime. Each release is built for, and pinned to, one PySide6 minor (its binding libraries aren't ABI-compatible across minors), so on another PySide6 minor pip picks the release built for it, or refuses the install, rather than installing a wheel that fails to import. 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 package exposes that permissive core directly to PySide6 users -- see the mission for the full background, and the design decisions for the technical choices.

More