Skip to main content

lexilla-py: Python bindings for Lexilla

CI PyPI License: MIT Python versions

Permissively-licensed Python bindings for Lexilla, the lexer library for Scintilla.

View on PyPI · View on GitHub

Status

See GitHub Issues for what's done and what's next.

Why this exists

Lexilla creates the lexer objects (ILexer5) that a Scintilla editor widget attaches via SCI_SETILEXER — it's a separate, Qt-free C++ library from Scintilla itself since Scintilla 5.0. This project exposes that library directly to Python. In practice, pyside6-scintilla is its only consumer, wired up via the set_lexer() convenience function (see Usage below) rather than raw SCI_SETILEXER pointer plumbing; it's kept as a separate package so this binding's release cadence and vendored Lexilla version can track upstream Lexilla releases independently of pyside6-scintilla's own release cycle — see docs/specs/mission.md for the full background.

Goals

lexilla aims to be:

  • MIT licensed — usable in open-source or closed-source projects freely
  • A faithful, low-level binding of Lexilla's CreateLexer/ILexer5 C++ API — not a redesign of it
  • Vendored and versioned independently of pyside6-scintilla — exposes the lexer as a raw pointer (SCI_SETILEXER-compatible), so this package can track upstream Lexilla releases on its own schedule
  • Available as pre-built wheels for Linux (x86_64, aarch64), Windows (x86_64), and macOS (arm64, x86_64)
  • Not affiliated with the Scintilla/Lexilla project

Installation

Install from PyPI:

pip install lexilla

Usage

from lexilla import Language, create_lexer
from lexilla.pyside6_scintilla import set_lexer
from pyside6_scintilla import ScintillaEdit

editor = ScintillaEdit()
lexer = create_lexer(Language.CPP)
assert lexer is not None
set_lexer(editor, lexer)

set_lexer() hands a created lexer to a pyside6-scintilla ScintillaEdit via SCI_SETILEXER, transferring ownership to it — see lexilla_highlighting for a complete example.

Versioning

Version numbers follow <Lexilla version>.<binding revision> — e.g. 5.5.0.0 is binding revision 0 for Lexilla 5.5.0. The binding revision increments for releases of this package that don't correspond to a new Lexilla version, and resets to 0 when Lexilla itself releases a new version.

Documentation

Doc Contents
docs/auditing.md How to verify the vendored Lexilla source matches upstream
docs/bindings.md How the nanobind bindings are built, and how they're expected to grow
docs/build.md Build prerequisites, local build/rebuild, wheels, and publishing
docs/documenting.md How the docs site is built (stub)
docs/specs/ Design specifications and action plans for in-progress and planned work
docs/specs/mission.md Project background, goals, and design decisions
docs/testpypi.md Setting up TestPyPI trusted publishing
examples/ No examples of its own — see pyside6-scintilla/examples/
GitHub Issues Ordered list of upcoming work
Project board Joint roadmap for lexilla-py and pyside6-scintilla; issues/PRs from both repos are auto-added

License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lexilla-5.5.0.1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lexilla-5.5.0.1-cp312-abi3-win_amd64.whl (782.6 kB view details)

Uploaded CPython 3.12+Windows x86-64

lexilla-5.5.0.1-cp312-abi3-manylinux_2_39_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.39+ ARM64

lexilla-5.5.0.1-cp312-abi3-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

lexilla-5.5.0.1-cp312-abi3-macosx_11_0_arm64.whl (716.0 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

lexilla-5.5.0.1-cp312-abi3-macosx_10_13_x86_64.whl (849.9 kB view details)

Uploaded CPython 3.12+macOS 10.13+ x86-64

lexilla-5.5.0.1-cp311-cp311-win_amd64.whl (784.7 kB view details)

Uploaded CPython 3.11Windows x86-64

lexilla-5.5.0.1-cp311-cp311-manylinux_2_39_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ ARM64

lexilla-5.5.0.1-cp311-cp311-manylinux_2_34_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

lexilla-5.5.0.1-cp311-cp311-macosx_11_0_x86_64.whl (852.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

lexilla-5.5.0.1-cp311-cp311-macosx_11_0_arm64.whl (718.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file lexilla-5.5.0.1.tar.gz.

File metadata

  • Download URL: lexilla-5.5.0.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lexilla-5.5.0.1.tar.gz
Algorithm Hash digest
SHA256 cda0dc86102a9138b746216d2ec4c34dedf2736f7ccc1675125c09082592f58f
MD5 9f35e6faf1370ba18f583d88f4bc9fb1
BLAKE2b-256 ebb79e57cdf273f419ffd30fc548ef3b70d6305759a31876ed303b5858563c25

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1.tar.gz:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: lexilla-5.5.0.1-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 782.6 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lexilla-5.5.0.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b344841152275e3fb57f0243281ad09cf79505fc1e02c6338a47f3ab926d7876
MD5 1ac05b4a8a4658cd48ca751cef72539e
BLAKE2b-256 1299dd03411bc99e84506b7044d61a14a1c6f6cdd73a5394423bf10256b6689c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp312-abi3-win_amd64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp312-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp312-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 3f683c6cb1431f6308d78b73f3970eb31fd60bbbf00cca4376a2b91cfe117bd4
MD5 112a269b28e2adf05058119f406ca544
BLAKE2b-256 38accad9b3d82fcd0b4bdbbbeb449d1244f8d02bf2f4dd98aabcc19b0bf19d2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp312-abi3-manylinux_2_39_aarch64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b0bfc642b94691010fa280a6e63247f46e60d5baa02c31e03f78d5112fa89b28
MD5 bd6334b4a9b1e88ffe0e1f6d1f423c81
BLAKE2b-256 0f5917bdff16a371e8eca8b8f6cf117b809a78396436295bf9013f93d0c05109

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp312-abi3-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6842917bf468626df27e6ad4e6ce27dd47a840c09a0a81306b2e6848a4920e22
MD5 26204bcf47d3c4e58a45da125a954f49
BLAKE2b-256 15992f9d46775ab0e0c4c9dad5cdeb81e6e12c962f3be82b3e52d250e8e97c4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp312-abi3-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp312-abi3-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 e05f9ddda41e9888a9331b68c84c0d76098d4e711cc7dafd03afa6ba6b09e902
MD5 b51ab89aa14d1bb2023c2934a5fc3460
BLAKE2b-256 a0bf1cec42a3d408ea5562ba9f555bfb6703fe10c68d04c7503347c9c3d51042

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp312-abi3-macosx_10_13_x86_64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: lexilla-5.5.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 784.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lexilla-5.5.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 77b85fd040526aa81a1ede6aae2ef0c04176302dedf70f5e00b24bb2b5383e38
MD5 dc559ee5c4b8e4f6a9293140adcccc9a
BLAKE2b-256 482459313ec34fc335963f0314cb9e600beb0497d7b8b4e9c806f33c3790108f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp311-cp311-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp311-cp311-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 a38badd42cc8745342018e88604110921aec4f75ed0208d4e7de388c77e4740c
MD5 c9c27243a34126add62ba28f82713c02
BLAKE2b-256 383983f76733eedc0cb71ec5c910fa7e14e03f4ee5927947d973ee60fff5396e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp311-cp311-manylinux_2_39_aarch64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e66fb88b81abf2489229bc23edf0833f9434406b245fc7ba3d457637b8e1a1ca
MD5 0e02d2b9cee9fadb0d75b5c5f3addea5
BLAKE2b-256 70e2c7bd31af34fe6336bbf2a3507958802de75315bb74342e61a6ad0065f833

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 5e670e00a20594f87c508a8ce0d0ea2852e1e48c0411b322c52c796efb0d8b2f
MD5 fe9dd1a4d2f257216c8ac8ed597b94b9
BLAKE2b-256 563e71bcf1f522dc06bebace7859ab03c3899c9c008f8b2822a87208db4749b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp311-cp311-macosx_11_0_x86_64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lexilla-5.5.0.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for lexilla-5.5.0.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 690f070baca06bc7a3607ef9687e077cda34d8873ea9cd2148959574a6ead364
MD5 ac45f25b996074b561aa71db1f020b7a
BLAKE2b-256 52f0b6dcfab5a96d20dab949a3e87f87b87fa77dfd1c9ecfc1cc90d4c7532b0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for lexilla-5.5.0.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on borco/lexilla-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page