Skip to main content

Syntax highlighting Qt text widget

Project description

syntaxedit

test PyPI

A simple Python Qt syntax highlighting widget

syntaxedit

Features

  • Extensive syntax and theme support - powered by Pygments
  • Set font and font size
  • Set indentation size

Usage

  1. Install package

    pip install syntaxedit
    

    Or

    poetry add syntaxedit
    
  2. In your app, include the package, and create a SyntaxEdit widget:

    from syntaxedit.core import SyntaxEdit
    
    code = """# Todo list
    
    - [ ] Go shopping
    - [x] Walk the dog"""
    
    widget = SyntaxEdit(code)
    

Available options

  • content: the initial content for the widget. Default: ""
  • parent: parent Qt widget for SyntaxEdit. Default: None
  • font: the font family for the widget. Default: "Courier New"
  • font_size: size to use for the font. Default: 13
  • syntax: the code syntax to use. Default: "Markdown"
  • theme: the syntax theme to use. Default: "solarized-light"
  • indentation_size: the size for indentation. Default: 4

Authors

By David Winter

License

MIT

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

syntaxedit-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

syntaxedit-0.2.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file syntaxedit-0.2.0.tar.gz.

File metadata

  • Download URL: syntaxedit-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1031-azure

File hashes

Hashes for syntaxedit-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aaacdfee909829aaf2f9a17c6fcc144a22be30f3d7ec5ebe1b53d8482052c468
MD5 01d0b4dd79e094eac24e958aa24af987
BLAKE2b-256 1108b7a256bc45408b8db242f87bfb3a87d7088ca951147ef504b79586e20dc7

See more details on using hashes here.

File details

Details for the file syntaxedit-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: syntaxedit-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.0-1031-azure

File hashes

Hashes for syntaxedit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 655da6e4577e4f1e3695881c9ffd3c842b233cd8eb68995b67dd986a3d657761
MD5 7b6b8c227504b86ec717674e8214470e
BLAKE2b-256 1747e4495370bfa54510ff27de0f7bdc0404fd4e9bd46af62394dc1f754870bc

See more details on using hashes here.

Supported by

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