Skip to main content

Python tkinter utilities.

Project description

Welcome to TkUtils

tkutils is a package offering some additional logic and syntactic sugar when using tkinter. The main goal is to fill some gaps of tkinter, which might make it very annoying to use.

Online version of the help documentation: http://frederic-zinelli.gitlab.io/tkutils/

Features

Additional logic: two-way binding, with Binder

The Binder class is to setup a transparent two-way binding reactivity between widgets and underlying object properties from the model/logic layer of the application.

Several advantages come with this:

  • Changes of bound properties in the model layer are cascading in the GUI automatically.
  • The model layer of the application becomes (finally) totally independent from the presentation layer. This means it becomes very easy to build and test the model layer, without any need to think about its integration with tkinter itself.

Syntactic sugar

GridLayout

A grid layout manager which is abstracting away all the naughty widget.grid(...) calls and rows/columns grid configuration. Positioning widgets in the grid and controlling their "spanning" becomes very easy, without extra typing.

MenuBuilder

A helper to build menus and to abstract away all the technicalities encountered when creating menus through tkinter, which quickly make the declarations very unclear. Using the MenuBuilder, the actual Menu hierarchy becomes very obvious: "what you see is what you get".

Event

A utility to build event strings with auto-completion/IDE suggestions support.

KeySym

A utility to get all keysym information with auto-completion/IDE suggestions (providing string, keycode and keysym_num values).

images

Various factories related to images to:

  • Simplify and reduce the typing needed,
  • Handle file conversions automatically,
  • Register automatically the image object on the host for the user (to avoid garbage collection).

Requirements

  • python 3.8+
  • Pillow

Installation

pip install tkutils
  • Using an archive file (with the appropriate version number):
pip install tkutils.1.0.2.tar.gz

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

tkutils-1.1.2.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

tkutils-1.1.2-py3-none-any.whl (44.1 kB view details)

Uploaded Python 3

File details

Details for the file tkutils-1.1.2.tar.gz.

File metadata

  • Download URL: tkutils-1.1.2.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.4 Linux/6.5.0-26-generic

File hashes

Hashes for tkutils-1.1.2.tar.gz
Algorithm Hash digest
SHA256 49a28e949dd2ee744cb7f1aa3c7e8d2055520f20639c9734442bf9e8f77ab267
MD5 e717621d33f44874bf21d2964db5c861
BLAKE2b-256 35a2831197c70e9cf94871636d1120ac0789d846bb4faf16adf4c5cf83ea0a69

See more details on using hashes here.

File details

Details for the file tkutils-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: tkutils-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 44.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.10.4 Linux/6.5.0-26-generic

File hashes

Hashes for tkutils-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7fcfc9b08200e7a5640bf4c4024ebe09b24b077955d39509dbcf771e89dc703c
MD5 342a3c6a42922bd82e5ada34361a23fc
BLAKE2b-256 b72a4bf59c901e1672e2dc547907f040fcfb6dad1d357fdda854423aa703208b

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