r/Tkinter • • 22h ago

Built a compact JARVIS-style Sci-Fi HUD & System Monitor in pure Tkinter — Free Lite Demo on GitHub!

Post image
1 Upvotes

r/Tkinter • • 1d ago

I built an entire IDE (more like a mini OS) using nothing but Python and Tkinter!

Post image
0 Upvotes

I'd like to share a project I've been working on for almost two years: Codis!

Codis is a feature-packed code editor built entirely with Python and Tkinter. It's kind of like a mini operating system, but with a strong focus on being a fully-fledged IDE.

It comes packed with features like LSP support, Python debugging (Debugpy), AI integrations, Git, an integrated terminal, SQL Studio, a plugin system, and MUCH more!

I'd really appreciate it if you guys checked it out and let me know what you think!

🌐 Website: https://killovsky.github.io/Codis/
💻 GitHub: https://github.com/KillovSky/Codis

Any feedback, suggestions, or ideas are more than welcome. I'd like to hear your thoughts!

Thanks for taking the time to check it out!

Preview:


r/Tkinter • • 9d ago

Heavy naval gun in fierce defensive action

7 Upvotes

Okay, this is Pygame, but let's see if you guys like it.


r/Tkinter • • 10d ago

I Added NPCs to My Tkinter RPG

Thumbnail
gallery
6 Upvotes

Code is available on GitHub.

NPCs

Each NPC is randomly assigned a work shift (determines when they work) and a profession (determines what kind of work they do).

Work Shifts:

  • 1st Shift: 6AM - 2PM

  • 2nd Shift: 2PM - 10PM

  • 3rd Shift: 10PM - 6AM

Professions:

  • Hunter

  • Cartographer

  • Butcher

  • Brewer

  • Ink Maker

  • Tanner

  • Tree Cutter

  • Paper Maker

  • Wood Burner

  • Miner

  • Smelter

  • Coinsmith

  • Water Collector

  • Forager

  • Blacksmith

NPCs will purchase/sell items as needed at the local market.

Character Creation

You can now:

  • Name yourself

  • Choose whether your character is Ambidextrous/Left Handed/Right Handed (Yes, it matters)

  • Choose a role (Determines your starting items)

  • Choose your starting experience (Determines how high the skills related to your role is)

  • Set your potential for each skill (Determines how fast the skill levels up during play)

Gameplay

You can now:

  • Craft various items as long as you have the right reagents in your inventory

  • Obtain ore from the Mine (You need a pickaxe in your inventory)

  • Pickaxes have durability and will break after extended use

  • The hand your pickaxe is in while in use matters


r/Tkinter • • 17d ago

My KatieCAD can now create electrical projects and 3D drawings

Thumbnail
gallery
32 Upvotes

I introduced this program a few days ago, but I’ve made such significant progress since then that I didn’t want to keep it from you.

I’ve fundamentally overhauled the program; it now functions in a way similar to EPLAN, while still retaining the standard features familiar to AutoCAD users. Symbols can now be placed with ease, and electrical connections are generated automatically. Furthermore, it is possible to export a wide variety of lists as well as cover sheets.

The user interface has been updated with new icons, previously, it looked more like a stone age SAP. xD

While the 3D visualizations are limited to simple wireframe models, I believe they are perfectly adequate for control cabinet layouts and similar, smaller assemblies.

You can create your own devices and blocks, and title blocks can also be customized to your specific needs.

I suspect that the extreme speed at which I’ve worked and the sheer volume of code—reveals that I’m a "vibecoder"; in other words, this project would never have come into existence without AI. That said, I can honestly say that even with Claude, it was an incredibly demanding process, I had to rethink every single function, arriving at this result only through small, incremental steps. The finer details, in particular, required a massive amount of work, and I’m certain I’ll discover even more things to refine as I go along.

I’m really happy that it works so well after all. Especially in the field of electrical engineering, I had been missing some open-source software.

https://github.com/Merecete/KatieCAD


r/Tkinter • • 27d ago

I am currently building my own CAD system, "KatieCAD"

Thumbnail
gallery
40 Upvotes

Alongside the media player, I also had the, admittedly somewhat crazy idea of ​​developing a CAD system modeled after AutoCAD. And so, KatieCAD comes into being.

https://github.com/Merecete/KatieCAD

Using Python and Tkinter, it’s working better than I had expected. So yes, you can actually draw with it! :D

I’m trying to integrate all the fundamental elements needed for drawing, though, to be honest, I’m still running into quite a few difficulties.

The basic functions seem to be working now, and I believe the program has reached a point where it’s genuinely usable.

I’ve added features for importing DXF/DWG files, as well as for exporting DXF files.

So far, I’ve only tested it on Windows, but the goal is for it to run smoothly on Linux and Mac as well.

It can be used in both German and English.

As I’ve mentioned before, my programming skills are limited, so I’m using various AI models to assist me.

EDIT: I have extensively revised it and added many features for the field of electrical engineering. You can now create actual projects and draw circuit diagrams.


r/Tkinter • • 29d ago

Working on a Media Player with Python and Tkinter

Thumbnail
gallery
54 Upvotes

I have developed a retro media player, Xenon Zones (or XZN).

https://github.com/Merecete/XZN

The visual design is intended to evoke the early 2000s, while remaining elegant and user-friendly. I find that it actually works surprisingly well with Tkinter. :)

It supports all common music and video formats.

It offers features such as saving and loading playlists, a functional equalizer, tag editing, and more. The color scheme can be customized, as can the window transparency. The background in the upper area can also be adjusted.

In addition to the media player, there is another program called "XZN-CDR" that can be used to rip CDs and convert audio tracks into common formats (MP3, OGG, FLAC, and WAV). The programs operate independently of each other.

Both programs are written entirely in Python and use Tkinter for the user interface.

It's run on Windows, MacOS, and Linux.

For the sake of transparency: I developed this with the help of AI, as I honestly have very little programming expertise myself but I like to learn. That said, I reviewed everything thoroughly and made many adjustments along the way. I’m quite proud of the result and believe it’s genuinely useful. What I mean is, I’m really trying to make an effort.

The program is licensed under the MIT License.

This is the first program I have ever published on GitHub. I would therefore very much appreciate any feedback or suggestions.

What do you think of the idea in general? Is there anything else I should keep in mind?


r/Tkinter • • Oct 07 '26

I Window Locker - a program to keep windows always on top

Post image
3 Upvotes

so I made this program with customtkinter and pywin32

it has a filtering system that I borrowed from how windows decides if an app is open on the taskbar or not.
I also used atexit to make sure that after you close the program no window will be stuck on top.

anyway, here the the GitHub repo: GitHub repo


r/Tkinter • • Sep 30 '26

How to optimize lots of calls to Font.measure

2 Upvotes

I need to implement text wrapping on a TKinter canvas, so I made a modified version of textwrap.TextWrapper from the python standard library, that uses the width of text instead of the character count.

This uses a lot of calls to Font.measure though, so according to cProfile most of my runtime is spent calling Font.measure. So now i want to optimize this, but the only idea i can come up with is to pre-measure all common characters and cache those values to then do the calculations on my own, but that seems like a janky solution.

Here's the (very long) function:

def _wrap_chunks(self, chunks, font: tkinter.font.Font = None, starting_width = None):
"""_wrap_chunks(chunks : [string]) -> [string]

Wrap a sequence of text chunks and return a list of lines of
length 'self.width' or less.  (If 'break_long_words' is false,
some lines may be longer than this.)  Chunks correspond roughly
to words and the whitespace between them: each chunk is
indivisible (modulo 'break_long_words'), but a line break can
come between any two chunks.  Chunks should not have internal
whitespace; ie. a chunk is either all whitespace or a "word".
Whitespace chunks will be removed from the beginning and end of
lines, but apart from that whitespace is preserved.
"""

lines = []
if self.width <= 0:
    raise ValueError("invalid width %r (must be > 0)" % self.width)
if self.max_lines is not None:
    if self.max_lines > 1:
        indent = self.subsequent_indent
    else:
        indent = self.initial_indent
    if font.measure(indent) + font.measure(self.placeholder.lstrip()) > self.width:
        raise ValueError("placeholder too large for max width")

# Arrange in reverse order so items can be efficiently popped
# from a stack of chucks.
chunks.reverse()

first_chunk = True

while chunks:

    # Start the list of chunks that will make up the current line.
    # cur_len is just the length of all the chunks in cur_line.
    cur_line = []
    cur_len = starting_width
    starting_width = 0

    # Figure out which static string will prefix this line.
    if lines:
        indent = self.subsequent_indent
    else:
        indent = self.initial_indent

    # Maximum width for this line.
    width = self.width - font.measure(indent)

    # First chunk on line is whitespace -- drop it, unless this
    # is the very beginning of the text (ie. no lines started yet).
    if self.drop_whitespace and chunks[-1].strip() == '' and lines:
        del chunks[-1]

    while chunks:
        l = font.measure(chunks[-1])

        # Can at least squeeze this chunk onto the current line.
        if cur_len + l <= width:
            cur_line.append(chunks.pop())
            cur_len += l

        # Nope, this line is full.
        else:
            if first_chunk:
                lines.append("")
            break

        first_chunk = False

    # The current line is full, and the next chunk is too big to
    # fit on *any* line (not just this one).
    if chunks and font.measure(chunks[-1]) > width:
        self._handle_long_word(chunks, cur_line, cur_len, width, font)
        cur_len = sum(map(font.measure, cur_line))

    # If the last chunk on this line is all whitespace, drop it.
    if self.drop_whitespace and cur_line and cur_line[-1].strip() == '':
        cur_len -= font.measure(cur_line[-1])
        del cur_line[-1]

    if cur_line:
        if (self.max_lines is None or
            len(lines) + 1 < self.max_lines or
            (not chunks or
             self.drop_whitespace and
             len(chunks) == 1 and
             not chunks[0].strip()) and cur_len <= width):
            # Convert current line back to a string and store it in
            # list of all lines (return value).
            lines.append(indent + ''.join(cur_line))
        else:
            while cur_line:
                if (cur_line[-1].strip() and
                    cur_len + font.measure(self.placeholder) <= width):
                    cur_line.append(self.placeholder)
                    lines.append(indent + ''.join(cur_line))
                    break
                cur_len -= font.measure(cur_line[-1])
                del cur_line[-1]
            else:
                if lines:
                    prev_line = lines[-1].rstrip()
                    if (font.measure(prev_line) + font.measure(self.placeholder) <=
                            self.width):
                        lines[-1] = prev_line + self.placeholder
                        break
                lines.append(indent + self.placeholder.lstrip())
            break
    first_chunk = False

return lines

r/Tkinter • • Sep 29 '26

[Project] tkblend: Bringing 60+ FPS JIT Vector Graphics & Modern Zero-TTK Widgets to Tkinter (Looking for feedback & contributors!)

Thumbnail
gallery
39 Upvotes

Hey r/Python**! 👋**

Like many of you, I've always appreciated the sheer ubiquity and zero-install simplicity of Python's built-in tkinter. However, we all know the classic pain points: dated TTK themes, sluggish software canvas rendering, pixelated scaling on HiDPI displays, and hitting frame drops when trying to do real-time visualization or modern UI aesthetics.

Over the past months, I’ve been experimenting with a question:
What if standard Tkinter had access to a modern, SIMD-accelerated 2D vector pipeline without needing Electron, Qt, or heavy browser runtimes?

That became tkblend — a modern, zero-TTK 2D vector UI engine and immediate-mode graphics canvas for Tkinter, powered by Blend2D JIT rasterization and zero-copy C++ blitting into Tk_PhotoPutBlock.

⚡ What does it do right now?

  • **Zero-Copy Blitting (**~0.38 ms blit latency): Blits directly from C++ Blend2D memory into Tkinter’s native photo buffer with zero intermediate Pillow/PIL copies.

  • 20+ Pure Vector Widgets: Completely independent of TTK themes (Button, Card, Switch, Slider, RangeSlider, SegmentedControl, CircularProgress gauges, Table, Dropdown, TextInput, etc.).

  • 60+ to 240+ FPS Canvas (BlendCanvas): An immediate-mode vector surface ready for smooth telemetry charts, particle physics, equalizers, and custom animations.

  • 13+ Built-in Dynamic Palettes: Seamless dark/light/Tokyo Night/Catppuccin/Nord theme switching at runtime.

  • Crisp Hi-DPI Scaling: Pure mathematical vector paths, Bézier curves, and multi-stop gradient shaders that stay razor-sharp at any resolution.

🤝 Why I’m posting: Looking for contributors & creative minds!

I have built the foundation, core C++ bindings, and widget architecture, but tkblend is an open experimental R&D playground, and I am genuinely curious:

What can developers with deeper expertise in C++, SIMD, computer graphics, typography, or UI design build and push forward with this?

There is so much untapped potential here, and I would love to collaborate with anyone interested in contributing:

  1. Low-Level & C++ Graphics Devs: Pushing SIMD optimizations, multi-threaded pipelines, sub-pixel text rendering, and direct GPU/hardware pathways.

  2. UI & Animation Enthusiasts: Designing spring physics, fluid micro-interactions, layout managers, or new vector components (charts, nodes, graphs, custom vector widgets).

  3. Tkinter & Python Pros: Refining the public Pythonic API, state management, ergonomics, and cross-platform quirks (Linux/X11, macOS, Windows).

  4. Makers & Builders: Stress-testing it! Build a dashboard, an audio synth visualizer, an emulator UI, or a game tool to see where it breaks or shines.

🔗 Repo & Links

I’d love to hear your thoughts, feedback, critiques, and ideas. If you’re interested in collaborating or hacking on it, PRs and issues are warmly welcomed!

What would you build with a 60+ FPS vector engine in standard Tkinter?


r/Tkinter • • Sep 19 '26

Working On a Procedural RPG in Tkinter

Thumbnail
gallery
22 Upvotes

Its a sandbox RPG sim. There isn't a set main quest or side quests. The idea is to add enough emergent systems that dynamically create interesting stories that the player can insert themselves into. Its still very early in development. The code is available on GitHub.

It has:

  • Proc Gen World

  • Exploration

  • Dynamic Economy

  • Banking System & Different Currencies

  • Survival


r/Tkinter • • Sep 17 '26

Build a Python Tkinter GUI Serial Communication Program to Communicate With Arduino Microcontroller

Thumbnail
youtube.com
11 Upvotes

In this tutorial, you will learn how to build a cross platform desktop application in Python and Tkinter (ttkbootstrap) that communicates with an Arduino microcontroller through Serial (UART) Communication.

Source Code + Website Article for Tkinter Serial Communication


r/Tkinter • • Sep 02 '26

I built a Snake Game using Python & Tkinter 🐍

28 Upvotes

Hey everyone!

I recently made a simple Snake Game with Python and Tkinter. It’s a beginner-friendly project focused on GUI programming, keyboard controls, and basic game logic.

GitHub: https://github.com/akarshit-1609/Snake_Game_using_Python_Tkinter

Feel free to check it out. If you like the project, a ⭐ GitHub star would be greatly appreciated!

I’d also love to hear any feedback or suggestions for improving the project.


r/Tkinter • • Aug 14 '26

Generating a number of buttons

3 Upvotes

I’m making a small program where I have a list of filenames and I want to put each filename on a button in tkinter, so when I click the button, python opens the file.

The list is called "fremtag"

The number of filenames may vary, so I have written a function and a for loop:

def Åbn(sti):
	os.startfile(sti)

for items in fremtag:
	counter += 1
	doc = Path(items)
	knap = doc.stem
	b_name = tk.Button(root, text=knap, command=lambda:Åbn(doc)).grid(row=counter,column=0)

It works in the sense that python opens a window with all the correct buttons, but no matter which button I click, only the last filename in the list is opened. I assume that the variable ”doc” is overwritten in memory each time a new button is generated.

Any ideas anyone?


r/Tkinter • • Aug 08 '26

Reading in Files

3 Upvotes

I'm trying to make a notepad app with the ability to open .txt files and save notes as them. However, when opening files, the text that displays gets wrapped in {}. How would I read in the files without having any text displayed wrapped in {}?

edit: here is the function I wrote to open files:

    file = filedialog.askopenfile(filetypes = [("Text File", ".txt"), ("All Files", "*")]); 
    text_box.insert(1.0, file.readlines()); 

r/Tkinter • • Aug 05 '26

I made my Canvas courses into an Obsidian vault, with concepts linked across lectures

Thumbnail
github.com
1 Upvotes

r/Tkinter • • Aug 03 '26

Simple Python tkinter (ttkbootstrap) GUI interface for serial port communication with Arduino

Thumbnail xanthium.in
6 Upvotes

r/Tkinter • • Aug 02 '26

Its just another day here building my house im my Tkinter voxel game.

Thumbnail
gallery
13 Upvotes

Disclaimer: this is not Minecraft.

just messed around building a house im my python voxel game.

The code is now over 4,700 lines, and some how Tkinter is still holding it together.


r/Tkinter • • Aug 01 '26

Just a normal day in my Tkinter voxel world

Thumbnail
gallery
19 Upvotes

Disclaimer: this is not Minecraft.

It’s a small voxel sandbox I’ve been building in Python using Tkinter Canvas. It has terrain generation, water flow, sheep, caves, a minimap, health, hotbar blocks, and first-person-ish movement.

It’s still very rough, but I’m honestly surprised Tkinter can handle this much fake 3D.


r/Tkinter • • Jul 29 '26

Created CTkDeb - a tool for easily packaging CustomTkinter projects into DEB packages

Post image
8 Upvotes

r/Tkinter • • Jul 29 '26

I built an open-source Tkinter toggle widget library (PyPI + GitHub)

20 Upvotes

I've been working on an open-source toggle widget library for Python's Tkinter that aims to make building desktop GUI applications easier and more modern.

Features

• Reusable Tkinter widgets

• Easy installation via PyPI

• Simple API

• Open source on GitHub

I recorded a short demo so you can quickly see how it works.

GitHub: https://github.com/akarshit-1609/tkinter-toggle

PyPI: https://pypi.org/project/tkinter-toggle/

If you try it out, I'd really appreciate any feedback or feature requests. Feel free to open an issue or start a discussion on GitHub.

Thanks! I'd love to hear your suggestions and feature requests.


r/Tkinter • • Jul 26 '26

Build a Cross-Platform Serial GUI using Python, Tkinter, ttkbootstrap, & PySerial for Beginners

Thumbnail gallery
5 Upvotes

r/Tkinter • • Jul 16 '26

MIT Celestarium

Post image
35 Upvotes

https://github.com/Felsyn/felhaven

If anyone wants to mess around with it.

Can use with a locally hosted gemma4 E2B model or better I guess.

*The voice stutter is a feature-like bug* but has no latency with the pregenerated filler messages- which could be shorter.

My specs: GTX 1660 and 16 GB ram

Made with Claude Code.

I tried to keep dependencies tiny, and local.

I'll be continuing Tinkering with Tkinter.


r/Tkinter • • Jul 11 '26

SM Studio #1 Devlog

3 Upvotes

r/Tkinter • • Jul 11 '26

comment détecter la fermeture d'une fenêtre

1 Upvotes

Bonjour, j'aimerais savoir comment détecter la fermeture d'un fenêtre Tkinter comment faire ?