Skip to main content

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

Project description

Python-Waterloo Lexer

Status 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.1.tar.gz (10.1 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.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_waterloo_lexer-0.5.1.tar.gz
  • Upload date:
  • Size: 10.1 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.1.tar.gz
Algorithm Hash digest
SHA256 703d467f57210afa8ca495d94c5302dad395d6e51b35578bc56de4a2623ddc15
MD5 a958f252fd51fe1ec61f368f20ec5cf6
BLAKE2b-256 8aada1efe820dc9c8359e751c8f853dff5757d2de6675d5fcd72321609a88692

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_waterloo_lexer-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b5da6d767dff05b2da488b418906f82f4552dea0291ee13fb7c56a4ad2d815da
MD5 b94fba26def950256de82a628392eb1c
BLAKE2b-256 2eb2585ce91c2abdb44c79bbbbfdc63ef5e0a1bc27dd976ac7e3e69c298d57b5

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