Repository navigation
0.1.0
First release on PyPI, as pytktable. Install Tktable separately: see the installation instructions.
What's new compared with the 2023 version
These changes were made with the help of
Claude (Anthropic), and reviewed by the maintainer.
Fixed
Tablecrashed on Python >= 3.10 when given any callback option (e.g.command,
browsecmd), becausecollections.Callablewas removed in Python 3.10.
It now usescallable().ArrayVar.unset()without a pattern passedNoneto Tcl instead of unsetting all
elements.ArrayVar.get()(without a key) failed withTypeErroron modern Python/tkinter, which
returns Tcl lists asTcl_Obj;ArrayVar.names()could return aTcl_Objfor the same reason.Table.tag_lower()did not pass the tag name to Tcl, so it always failed.Table.height(0)returned the heights of all rows instead of the height of row 0.
Added
python -m tktable: diagnoses whether tkinter, Tcl/Tk and Tktable can be found and
loaded, and prints the Tcl version,TKTABLE_LIBRARYand Tcl'sauto_path. It works
without a display (e.g. in CI) and without tkinter installed.- Documentation (Sphinx + Markdown), published to GitHub Pages: installation per OS, usage,
API reference (one page per module), development and releasing. - Tests (pytest) for
ArrayVar,Table,tktable.utilsand the diagnostic. Tests that need Tktable are
skipped when it is missing, or fail ifTKTABLE_REQUIRED=1. - Development commands (set up, format, check, test, docs, ...) as Poe the Poet
tasks inpyproject.toml, the same on Linux, macOS and Windows. Runpoetry run poeto list
them. - GitHub Actions workflows:
- tests on Linux, macOS and Windows with Python 3.11 to 3.15, plus quality checks;
- tests in Debian and Ubuntu containers using their Tktable packages;
- an experimental job testing Magicsplat's Tktable with python.org's Python on Windows;
- release to PyPI (Trusted Publishing) and GitHub when a version tag is pushed.
- Dockerfiles (
docker/) to run the tests with each Linux distro's own packages, and docs on
running the example in the Ubuntu container on Windows (WSLg) and Linux, without installing
Tktable. - pre-commit hooks that run all quality checks on every commit (install them with
poetry run pre-commit install): the Poe check tasks (lock file, isort, black, mypy, pylint),
YAML linting (yamllint), secret scanning (gitleaks) and security checks (bandit). AGENTS.md: code style and workflow guidelines for contributors and AI agents.- README: badges, short description and installation, pointing to the documentation.
Changed
- Published on PyPI as
pytktable, becausetktableis taken by an unrelated project.
The import name is stilltktable. - Requires Python >= 3.11.
pyproject.tomluses the standard[project]table (Poetry 2); dev dependencies
updated.CannotUseErrornow tells users to runpython -m tktableand links to the README.- Loading Tktable (including
TKTABLE_LIBRARYsupport) moved totktable.utils, shared
byTableand the diagnostic. - The library logs at
DEBUGlevel instead ofINFO; the example logs instead of printing. tktable/__init__.pyimportsArrayVarandTablelazily, so the diagnostic works
without tkinter (explained in the module docstring).
Earlier work (2023)
- Packaging with
pyproject.tomland Poetry instead ofsetup.py(#8). - Code formatted with black and isort (#9).
- Python 2 support removed (#19).
- Code cleaned up with pylint, and the example moved to
examples/(#20). tktable.pysplit into thetktablepackage, withTableandArrayVarin their own modules (#22).- A clear error,
CannotUseError, when Tktable is missing (#23). - Python version support and classifiers updated (#24), and the maintainer's email (#26).
History
The wrapper was originally written by Guilherme Polo in 2008. The repository's history from 2015 to 2017, before it was restructured, is in the master_01_09_2017 branch.