Skip to main content

A pygments lexer derived from the Python lexer, for Waterloo docstrings

Project description

Python-Waterloo Lexer

Status Version License Python

python-waterloo-lexer is a Pygments lexer for Python files that contain Waterloo docstrings.

It can be used with pygmentize and other tools that load Pygments lexers via entry points.

What it provides

  • a python-waterloo Pygments lexer alias
  • syntax highlighting for Python files with Waterloo docstrings
  • installation via PyPI, local checkout, or Git URL

Installation

pip install python-waterloo-lexer

Quick test

After installation, the lexer is available under the alias python-waterloo.

pygmentize -l python-waterloo -f terminal16m <file.py>

You can also check whether Pygments lists the lexer:

pygmentize -L lexers | grep -i waterloo || true

Terminal viewer

For a quick terminal preview, a less alias can be handy:

alias lessh='LESSOPEN="| pygmentize -O style=monokai %s" less -M -R'

Then open files with:

lessh <file.py>

Project repository

Development happens in the Waterloo repository:

The repository also contains related tooling, documentation, and editor integrations for Waterloo docstrings.

Project details


Download files

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

Source Distribution

python_waterloo_lexer-0.5.5.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

python_waterloo_lexer-0.5.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file python_waterloo_lexer-0.5.5.tar.gz.

File metadata

  • Download URL: python_waterloo_lexer-0.5.5.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for python_waterloo_lexer-0.5.5.tar.gz
Algorithm Hash digest
SHA256 8b19979f723acd10cda1801020b8b1f1ef2cba8be3a64f4390a12e3cc0b1afc8
MD5 1bc09aa568cf46a55a13acb4b463e4ba
BLAKE2b-256 08febae51b7fba00a6026c09b29698a229f5a022c5d41b3ca089f1e62689119f

See more details on using hashes here.

File details

Details for the file python_waterloo_lexer-0.5.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_waterloo_lexer-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0b899cd4173a4572260da705f9b9a64972a474885013395b33473fe861d73407
MD5 05f5f0fa522b1ad73d1735dca0d6da93
BLAKE2b-256 39232149e1a843bee481a7a2200c72abb0b0ec4beb59e44c8c8c9ca6e18b4c7a

See more details on using hashes here.

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