chlorophyll


Namechlorophyll JSON
Version 0.4.2 PyPI version JSON
download
home_pagehttps://github.com/rdbende/chlorophyll
SummaryA module that fills your code with color - syntax highlighted text box widget for Tkinter.
upload_time2024-05-11 14:21:41
maintainerNone
docs_urlNone
authorrdbende
requires_python>=3.7
licenseMIT license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">Chlorophyll</h1>

> **Note**
> This module is the successor to [`tkcode`](https://github.com/rdbende/tkcode), as it is deprecated - please do not use it any more.

## Description
Chlorophyll provides the `CodeView` widget for tkinter, which is a `Text` widget with syntax highlighting, line numbers, and works as a simple code editor. It is written in Python and uses the [`pygments`](https://pygments.org/) library for syntax highlighting and the [`TkLineNums`](https://www.github.com/Moosems/TkLineNums) module for line numbers.

## Installation
`pip install chlorophyll`

## Development install
First, fork the repo, then run these commands in your terminal
```console
git clone https://github.com/your-username/chlorophyll
cd chlorophyll
python3 -m venv env
source env/bin/activate
pip install -e .
```

# Documentation

### `CodeView` Widget
|Options             |Description                     |Input                                         |
|--------------------|--------------------------------|----------------------------------------------|
|master              |The parent widget               |Tkinter widget                                |
|lexer               |The Language lexer              |Pygments lexer                                |
|color_scheme        |A color scheme for the code     |Dict, string, or toml file                    |
|tab_width           |The width of a tab (`\t`)       |Int                                           |
|autohide_scrollbar  |Auto hide scrollbars            |Bool                                          |
|linenums_border     |Border width of the line numbers|Int                                           |
|default_context_menu|Enable context menus in CodeView|Bool                                          |
|**kwargs            |Keyword arguments for the widget|Any keyword arguments given to a `Text` widget|

#### Basic Usage:
```python
from tkinter import Tk

import pygments.lexers
from chlorophyll import CodeView

root = Tk()

codeview = CodeView(root, lexer=pygments.lexers.RustLexer, color_scheme="monokai")
codeview.pack(fill="both", expand=True)

root.mainloop()
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rdbende/chlorophyll",
    "name": "chlorophyll",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "rdbende",
    "author_email": "rdbende@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dc/a7/65ca60d3df76cffb4e83595cb8b47c4c2996204b65755c21ea0054f14bdc/chlorophyll-0.4.2.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">Chlorophyll</h1>\n\n> **Note**\n> This module is the successor to [`tkcode`](https://github.com/rdbende/tkcode), as it is deprecated - please do not use it any more.\n\n## Description\nChlorophyll provides the `CodeView` widget for tkinter, which is a `Text` widget with syntax highlighting, line numbers, and works as a simple code editor. It is written in Python and uses the [`pygments`](https://pygments.org/) library for syntax highlighting and the [`TkLineNums`](https://www.github.com/Moosems/TkLineNums) module for line numbers.\n\n## Installation\n`pip install chlorophyll`\n\n## Development install\nFirst, fork the repo, then run these commands in your terminal\n```console\ngit clone https://github.com/your-username/chlorophyll\ncd chlorophyll\npython3 -m venv env\nsource env/bin/activate\npip install -e .\n```\n\n# Documentation\n\n### `CodeView` Widget\n|Options             |Description                     |Input                                         |\n|--------------------|--------------------------------|----------------------------------------------|\n|master              |The parent widget               |Tkinter widget                                |\n|lexer               |The Language lexer              |Pygments lexer                                |\n|color_scheme        |A color scheme for the code     |Dict, string, or toml file                    |\n|tab_width           |The width of a tab (`\\t`)       |Int                                           |\n|autohide_scrollbar  |Auto hide scrollbars            |Bool                                          |\n|linenums_border     |Border width of the line numbers|Int                                           |\n|default_context_menu|Enable context menus in CodeView|Bool                                          |\n|**kwargs            |Keyword arguments for the widget|Any keyword arguments given to a `Text` widget|\n\n#### Basic Usage:\n```python\nfrom tkinter import Tk\n\nimport pygments.lexers\nfrom chlorophyll import CodeView\n\nroot = Tk()\n\ncodeview = CodeView(root, lexer=pygments.lexers.RustLexer, color_scheme=\"monokai\")\ncodeview.pack(fill=\"both\", expand=True)\n\nroot.mainloop()\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A module that fills your code with color - syntax highlighted text box widget for Tkinter.",
    "version": "0.4.2",
    "project_urls": {
        "Homepage": "https://github.com/rdbende/chlorophyll"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dca765ca60d3df76cffb4e83595cb8b47c4c2996204b65755c21ea0054f14bdc",
                "md5": "0fb53d1e13693d7d63db2a16c3ee354b",
                "sha256": "950c8f48cc5bd3bf201341d0f69e114d52156f9403e23132e1683ae6b5246ba8"
            },
            "downloads": -1,
            "filename": "chlorophyll-0.4.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0fb53d1e13693d7d63db2a16c3ee354b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 10430,
            "upload_time": "2024-05-11T14:21:41",
            "upload_time_iso_8601": "2024-05-11T14:21:41.435831Z",
            "url": "https://files.pythonhosted.org/packages/dc/a7/65ca60d3df76cffb4e83595cb8b47c4c2996204b65755c21ea0054f14bdc/chlorophyll-0.4.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-11 14:21:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rdbende",
    "github_project": "chlorophyll",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "chlorophyll"
}
        
Elapsed time: 0.29179s