Tukaan is the new framework that aims to replace Tkinter

Related tags

python gui
Overview

Tukaan

Code style: black

Tukaan is the new, pythonic and colorful (like a keel-billed toucan) framework that aims to replace Tkinter. It has everything (on my computer, not at GitHub) that you need to develop cross-platform GUIs.

WIP

Although all the basic widgets and other classes already exist in my local repo, they are not yet ready to push them to GitHub. I only push things to GitHub that work and can be tried, but they are still in progress, so you shouldn’t use it in any project.

The goal of Tukaan

The goal of Tukaan is to be an easy-to-use, powerful and pythonic alternative to Tkinter.

Tkinter is just a wrapper around Tk, that is so thin, that you can see through it, and even has holes on it. If you have ever used Tkinter, you know, it's kinda dumb. There are a lot of things not implemented in Tkinter, you can only access them with Tcl calls. Tukaan has everything you could need, and maybe even more.

In Tcl almost everything is represented as strings, and Tkinter doesn't convert them to Python objects, so you have to do that yourself. If you mess something up, it won't raise a Python exception, but Tcl a error, which you don't know what's wrong even if you know the Tcl language. Tkinter also looks awful by default. You can change this, if you use the the Ttk extensions. But why should you use extensions to make your GUI not look like it came from the 90's?

With Tukaan this is completely different. With it, the app looks native by default on Windows and on Mac OS as well. Unfortunately this isn't possible on Linux, but it uses a better theme than the Tk default.

Simple example

import tukaan

class MyApp(tukaan.App):
    def __init__(self):
        tukaan.App.__init__(self, title="My nice little Tukaan app")

        self.position = "center"

        self.button = tukaan.Button(self, text="Button")
        self.button.callback = lambda: print("ok")

        self.pack_widgets()
	
    def pack_widgets(self):
        self.button.pack()


def main():
    MyApp().run()

if __name__ == "__main__":
    main() 

Some very nice things in tukaan

Get clipboard content

print(tukaan.Clipboard.get())

# or

print(tukaan.Clipboard.content)

When was the user last active on the computer

print("User last active", tukaan.App().user_last_active, "seconds ago.")

Centering a window on the screen

For some reason it doesn't work sometimes

app = tukaan.App()
app.position = "center"

Color conversions

>> (0, 127, 255) print(color.hsv) >>> (210, 100, 100) print(color.cmyk) >>> (100, 50, 0, 0) ">
color = tukaan.Color("#007fff")
print(color.rgb)
>>> (0, 127, 255)
print(color.hsv)
>>> (210, 100, 100)
print(color.cmyk)
>>> (100, 50, 0, 0)

Screen information

screen = tukaan.Screen()
print(screen.width)
>>> 1920
print(screen.height)
>>> 1080
print(screen.dpi)
>>> 72

Credits

Many thing in Tukaan is based on:

Issues
  • Add useful classes

    Add useful classes

    • [x] Color
    • [x] Cursor
    • [x] ScreenDistance
    • [x] Screen
    • [x] Font
    • [x] Clipboard
    opened by rdbende 2
  • `tukaan.App` is crazy inefficient

    `tukaan.App` is crazy inefficient

    https://github.com/tukaan/tukaan/blob/fcf7ff97fe14da80d7f0d8b71e74c28d839e24f6/tukaan/app.py#L56-L70

    $ cat test.py
    import tukaan, tkinter, timeit
    
    
    def asdf():
        _ = tukaan.App()
        _.quit()
    
    
    def qwer():
        _ = tkinter.Tk()
        _.quit()
    
    
    print(timeit.timeit(asdf, number=100))
    print(timeit.timeit(qwer, number=100))
    
    $ python3 test.py
    can't invoke "event" command: application has been destroyed
        while executing
    "event generate $w <<ThemeChanged>>"
        (procedure "ttk::ThemeChanged" line 6)
        invoked from within
    "ttk::ThemeChanged"
    [...] * 99
    10.320173018000037  # tukaan
    2.983373939999933   # tkinter
    

    without those lines, tukaan is only between 2.9 and 3.3 seconds

    Times

    • with tukaan I never got below 2.9 (commented out those lines)
    • with tkinter I never got below 2.7
    • (with teek I never got below 3.3)
    opened by rdbende 2
  • add button widget

    add button widget

    null

    opened by rdbende 1
  • Add bindings and events

    Add bindings and events

    null

    opened by rdbende 1
  • Add Entry widget

    Add Entry widget

    Closes #19

    • [x] basic stuff
    • [x] more stuff
    • [x] validation
    opened by rdbende 1
  • shit

    shit

    null

    opened by rdbende 0
  • Add app object

    Add app object

    seems enough for today

    opened by rdbende 0
  • App object speed fix

    App object speed fix

    ~~Fixes~~ Closes #7

    opened by rdbende 0
  • speed things up

    speed things up

    null

    opened by rdbende 0
  • Add `TextBox`

    Add `TextBox`

    null

    opened by rdbende 0
  • Improve `TextBox`

    Improve `TextBox`

    • [ ] make something with Tag. prev, next range, (i really don't like, how they currently work)
    • [ ] more preset tag?
    opened by rdbende 0
  • Fonts

    Fonts

    Font management in Tk (and in Tkinter too) is a big pile of fckng shitt

    In Tukaan it shouldn't be

    opened by rdbende 0
  • Add `tukaan.TextBox` widget

    Add `tukaan.TextBox` widget

    tukaan.TextBox widgets

    Requires: tukaan.Image

    Documentation: text(3tk)

    Features to be implemented:

    • [x] get
    • [x] delete
    • [x] insert
    • [ ] search
    • [ ] replace
    • [x] scroll_to
    • [x] tags
    • [x] all tag attribute
    • [x] marks
    • [x] fancy index handling
    • [ ] auto scrollbars
    • [ ] insert from file
    • [ ] easy way to embed widgets
    • [ ] insert images
    • [x] content getter, setter
    • [ ] all attributes
    • [ ] fancy undo/redo handling
    enhancement widget 
    opened by rdbende 0
  • Create exceptions, and raise them

    Create exceptions, and raise them

    Always raise Python exceptions instead of Tcl ones.

    opened by rdbende 0
  • Add Images

    Add Images

    tukaan.BaseImage, tukaan.Image and tukaan.Icon classes

    Images work only with PIL

    A widget to display images

    image = PIL.Image.open("img.jpg")
    
    image_widget = tukaan.Image(root, image)
    image_widget.lm_stuff()
    

    Can also be used for a button, or anything else

    image = PIL.Image.open("img.jpg")
    
    image_button = tukaan.Button(root, image=image)
    image_button.lm_stuff()
    

    Icon class WITHOUT PIL, so it's fast, but immutable, only png

    icon = tukaan.Icon("icon.png")
    
    icon_button = tukaan.Button(root, image=icon)
    icon_button.lm_stuff()
    
    • [ ] Image
    • [ ] Icon
    • [ ] Animated Images
    enhancement widget 
    opened by rdbende 0
  • Update Label widget

    Update Label widget

    tukaan.Label widgets

    Requires other object: tukaan.BaseImage

    Documentation: ttk_label(3tk)

    Features to be implemented:

    • [ ] images
    widget 
    opened by rdbende 0
  • Add Frame widget

    Add Frame widget

    tukaan.Frame widget

    Required widgets: tukaan.ScrollBar

    Documentation: ttk_frame(3tk)

    Features to be implemented:

    • [ ] Built in scrollbars, adjustable by the overflow attribute
    widget 
    opened by rdbende 0
  • Add TabView widget

    Add TabView widget

    tukaan.TabView and tukaan.TabView.Tab widgets

    Requires other widget: tukaan.Frame

    Documentation: ttk_notebook(3tk)

    Features to be implemented:

    • [ ] append tabs
    • [ ] remove tabs
    • [ ] hide/unhide tabs
    • [ ] move tabs
    • [ ] select tabs
    • [ ] config tabs
    • [ ] get selected tab -> property
    widget 
    opened by rdbende 0
  • tests

    tests

    ohh, I hate write tests

    but I always mess up thing, so it would be good

    opened by rdbende 0
Owner
Tukaan
Tukaan is the new framework that aims to replace Tkinter
Tukaan
Tkinter Designer - Create Beautiful Tkinter GUIs by Drag and Drop.

Tkinter Designer is created to speed up and beautify Python GUI Experience. It uses well know design software called Figma. Which makes creating Tkinter GUI in Python a piece of cake.

Parth Jadhav 2.7k Oct 24, 2021
🏆 A ranked list of awesome python libraries for web development. Updated weekly.

Best-of Web Development with Python ?? A ranked list of awesome python libraries for web development. Updated weekly. This curated list contains 540 a

Machine Learning Tooling 1.4k Oct 22, 2021
This program is written in python. It will help you find a valid solution for a sudoku puzzle.

Sudoku-Solver-Using-Tkinter This program is written in python. It will help you find a valid solution for a sudoku puzzle. Requirements: Python3 IDLE

Ankan Mahapatra 3 Oct 2, 2021
Key Cast - Cast your key presses and mouse clicks on the screen, while casting your favorite application on the screen. Better than the rest.

Key Cast Screen cast your keyboard and mouse clicks in style Project Homepage » View Demo · Report Bug · Request Feature Table of Contents Introductio

Mehul Singh Teya 7 Sep 25, 2021
Basic calculator using Tkinter GUI

Basic calculator using Tkinter GUI

Rogerio Penchel 19 Oct 15, 2021
A Python Tkinter based Inventory managment System

Inventory Management System Using Python Tkinter Introduction Inventory managemrnt system is an open source platform for manage business. It has a com

Amit Kumar Datta 2 Oct 14, 2021
My Git GUI version made in Python and Tkinter.

Description My Git GUI version made in Python and Tkinter. How to use Basically, create a folder in your computer, open the software, select the path

Matheus Golzio 4 Oct 10, 2021
System Tray Icon for PySimpleGUI (the tkinter version). Adds a system tray icon by using pystray and PIL

psgtray Add a System Tray Icon to your tkinter port of PySimpleGUI. Installation via pip Installation is via pip: python -m pip install psgtray or if

PySimpleGUI 9 Oct 14, 2021
Json IDE made with Python tkinter!

JIDE Json IDE made with Python tkinter! Download: https://github.com/LouisTheXIV/JIDE/releases/tag/v0.1 Features In JIDE everything is customisable do

n0 5 Sep 18, 2021
Edifice: a declarative GUI library for Python

Edifice is a Python library for building reactive UI, inspired by modern Javascript libraries such as React.

David Ding 77 Oct 9, 2021
Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Will McGugan 5.8k Oct 18, 2021
Write desktop and web apps in pure Python

Flexx Want to stay up-to-date about (changes to) Flexx? Subscribe to the NEWS issue. Introduction Flexx is a pure Python toolkit for creating graphica

flexxui 2.8k Oct 14, 2021
Write desktop and web apps in pure Python

Flexx Want to stay up-to-date about (changes to) Flexx? Subscribe to the NEWS issue. Introduction Flexx is a pure Python toolkit for creating graphica

flexxui 2.8k Oct 15, 2021
Dress up your code with a beautiful graphical user interface !

Dresscode Dress up your code with a beautiful graphical user interface ! This project is part of the Pyrustic Ecosystem. Look powered by the cyberpunk

null 22 Sep 2, 2021
Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS

Kivy Innovative user interfaces made easy. Kivy is an open source, cross-platform Python framework for the development of applications that make use o

Kivy 13.6k Oct 22, 2021
A simple yet powerful TUI framework for your Python (3.7+) applications

A simple yet powerful TUI framework for your Python (3.7+) applications

null 170 Oct 14, 2021
UberGui is a lightweight multi-threaded, webRender UI module for TouchDesigner

UberGui V4 UberGui is a lightweight multi-threaded, webRender UI module for TouchDesigner projects. The aim is to solve the trifecta of challenges bui

LUCAS M MORGAN 38 Jun 19, 2021
Rich.tui is a TUI (Text User Interface) framework for Python using Rich as a renderer.

rich.tui Rich.tui is a TUI (Text User Interface) framework for Python using Rich as a renderer. The end goal is to be able to rapidly create rich term

Will McGugan 5.9k Oct 21, 2021
Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development.

DelphiFMX4Python Delphi's FireMonkey framework as a Python module for Windows, MacOS, Linux, and Android GUI development. About: The delphifmx library

Embarcadero Technologies 29 Oct 14, 2021