Skip to main content

A simple GUI package based on Tkinter

Project description

Tkintertoy

Tkintertoy was designed to be a easy to use GUI library based on Tkinter. It was intended for "young" (as in experience) programmers to develop GUIs with as little trouble as possible. However, more "advanced" programmers can reach the more complex features of Tkinter easily. Here is a short example:

from tkintertoy import Window
# create the window
gui = Window()
gui.setTitle('My First Tkintertoy GUI!')
# add the widgets
gui.addEntry('name', 'Type in your name')
gui.addLabel('welcome', 'Welcome message')
gui.addButton('commands')
# plot the widgets
gui.plot('name', row=0)
gui.plot('welcome', row=1)
gui.plot('commands', row=2, pady=10)
# start the event processing loop
while True:
    gui.waitforUser()
    if gui.content:
        gui.set('welcome', 'Welcome ' + gui.get('name'))
    else:
        break

This code will create a small window with an entry, label, and command button widgets. The application will wait for the user to type in their first name. After typing it in, and clicking on Ok, the application will display a welcome label. The user exits the code by clicking on Cancel.

Simple GUI

As you can see in orgder to create a simple GUI, you create a window, add widgets, plot the widgets in the desired location, and then call waitforUser.

While Tkintertoy was designed to be an GUI library for simple interfaces it has been used in more complex code as well.

Using Tkintertoy, it is hoped that Python instructors can quickly move students from boring command-line applications to useful standard GUIs. A tutorial with many useful examples in included with the documentation.

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

tkintertoy-1.1.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkintertoy-1.1.0-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file tkintertoy-1.1.0.tar.gz.

File metadata

  • Download URL: tkintertoy-1.1.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for tkintertoy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c73c718e6e416bdd69bb8a42483de84453d2e2f283411883c39343b1007a1709
MD5 ccaaa962de79ee885f1b7c970157075f
BLAKE2b-256 07e1da7dae21bb8c7ad7cb220f88f5c222c1237486822fb084322a352ac0e92b

See more details on using hashes here.

File details

Details for the file tkintertoy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tkintertoy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for tkintertoy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53d4da2805c060e9189780178b4c2f478422e3989af1edf86f525bd51fb09757
MD5 a827ef3d842809840cf996f60f15e4ea
BLAKE2b-256 377cd2eb43e45d96e3a186bacca51769851ffddb6f48b034dca21930adf2967e

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