Skip to content

djlemke/7-GUIs-Tkinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

7 GUIs Tkinter

An implementation of the 7 GUIs tasks using Python's built-in Tkinter library.

Background

This project implements the tasks with a focus on modern Python practices: proper encapsulation, type hinting, and clear, reusable components, avoiding the common pitfalls of simple procedural scripts.

Requirements

  • Python 3.x

Usage

All commands should be run from the root of the project directory.

As an Application

Launch the main window to access all GUIs:

python -m guis

Or, run a specific GUI directly:

python guis/counter.py

Code Usage

import sys
import tkinter as tk

import guis.counter as counter


class MyCounter(counter.Counter):
    """A custom counter that increments by 2."""
    def __init__(self, parent):
        super().__init__(parent)
        parent.title("Increment by 2")

    def increment(self):
        """Increment the count by 2 instead of 1."""
        self.count.set(self.count.get() + 2)


def main():
    root = tk.Tk()
    MyCounter(root)
    root.mainloop()


if __name__ == "__main__":
    sys.exit(main())

Maintainer

Daniel J. Lemke daniel@lemketech.com

https://lemketech.com/

https://github.com/djlemke

Contributing

This package is not currently open for contributions.

License

Licensed under the MIT License. See LICENSE for details.

About

An implementation of the 7 GUIs tasks using only the Python standard library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages