Table of Contents
Did you know you can turn your Python scripts into full desktop applications with graphical interfaces, beyond the terminal?
GUI libraries allow you to build interactive windows, data entry forms, buttons, and dashboards, making your programs more professional, accessible, and client-ready.
Imagine a financial analyst needing to calculate monthly KPIs.
A GUI app removes the need for command-line interaction – users simply open a window, input data, click a button, and see results visually.
This improves usability and enhances the perceived value of your solutions.
Why Use GUI Libraries in Python?

✔ Ease of use for non-programmers
End users interact with scripts via buttons and inputs without needing coding knowledge.
✔ Rapid internal tool prototyping
Quickly validate ideas with Minimum Viable Products (MVPs) before investing in complex technologies.
✔ Business process automation
Develop apps that automate repetitive calculations, sales dashboards, or engineering tools.
✔ Enhanced user experience
Visual elements improve communication of results, reducing errors and increasing adoption.
🔍 Curiosity: Large software like Blender uses Python for internal scripting and GUI automation to simplify 3D modeling workflows.
Overview of Main GUI Libraries
Tkinter
•Description: Python’s standard GUI library, lightweight and included by default.
•Typical uses: Quick calculators, data entry forms, administrative tools.
•Limitations: Old-fashioned visual design that may appear outdated for modern commercial apps.
import tkinter as tk
💡 Practical tip: Use grid() for structured layouts instead of pack() when building forms with multiple aligned inputs.
CustomTkinter
•Description: Modernized Tkinter with native light/dark themes and sleek visual components.
•Typical uses: Financial dashboards, professional-looking desktop apps.
•Limitations: Relies on Tkinter as its backend; for extremely advanced interfaces, PyQt remains superior.
import customtkinter as ctk
🛠️ Real-world note: Combine CustomTkinter with matplotlib to build interactive sales dashboards with minimal code.
PyQt / PySide
•Description: Based on the robust Qt framework, ideal for professional and enterprise-grade applications.
•Typical uses: ERPs, CAD tools, process simulation software.
•Limitations: Steeper learning curve due to its depth of features.
from PyQt5.QtWidgets import QApplication, QWidget
📌 Tech trivia: Qt powers commercial software like Autodesk Maya and KDE Linux desktop apps.
Kivy
•Description: Built for multitouch and mobile-friendly apps, supports Android, iOS, Windows, Linux, and MacOS from a single codebase.
•Typical uses: Mobile apps, touchscreen POS systems, kiosk applications.
•Limitations: Lacks native OS “look and feel,” requiring learning its specific layout system.
from kivy.app import App
💡 Insight: Great for startups needing fast cross-platform MVPs without licensing fees.
Dear PyGui
•Description: Immediate-mode GUI library, excellent for quick dashboards and data visualization tools.
•Typical uses: Debugging tools, ML dashboards, real-time data monitors.
•Limitations: Less suitable for complex multi-window corporate applications.
import dearpygui.dearpygui as dpg
🔍 Curiosity: Inspired by ImGui, widely used in game engines for development interfaces.
Choosing the Right Library: Pros and Cons

Library | Pros | Cons |
---|---|---|
Tkinter | Easy, standard, lightweight | Limited modern design |
CustomTkinter | Modern, dark mode, easy | Less documentation |
PyQt/PySide | Professional, robust, multiplatform | Steeper learning curve |
Kivy | Mobile and multitouch | Different design syntax |
Dear PyGui | Fast dashboards, built-in graphs | Newer, smaller community |
Real World Example: Financial Dashboard Prototype
💼 Scenario
You’re a business analyst building a desktop app to calculate monthly sales percentage variation and visualize comparisons in a bar chart for quick financial team meetings.
This tool automates repetitive calculations, minimizes manual errors, and enhances decision-making by presenting clear visuals during performance reviews.
Python Script: Manual vs Function Calculation
📝 Complete Script with Line-by-Line Comments.
# Financial Dashboard Prototype with Tkinter
import tkinter as tk
import numpy as np
import matplotlib.pyplot as plt
# Function to calculate variation manually
def calc_variation_manual(prev, curr):
variation = ((curr - prev) / prev) * 100
return variation
# Function using NumPy
def calc_variation_numpy(prev, curr):
prev = np.array(prev)
curr = np.array(curr)
return np.round(((curr - prev) / prev) * 100, 2)
# GUI Function
def calculate():
prev = float(entry_prev.get())
curr = float(entry_curr.get())
manual = calc_variation_manual(prev, curr)
numpy = calc_variation_numpy(prev, curr)
result_label.config(text=f"Manual: {manual:.2f}% | NumPy: {numpy:.2f}%")
# Plotting comparison
fig, ax = plt.subplots()
ax.bar(['Manual', 'NumPy'], [manual, numpy])
ax.set_ylabel('Variation (%)')
ax.set_title('Sales Variation Comparison')
# Save plot
plt.savefig('variation_comparison.png')
plt.show()
# GUI Layout
root = tk.Tk()
root.title("Sales Variation Calculator")
tk.Label(root, text="Previous Sales").grid(row=0, column=0)
tk.Label(root, text="Current Sales").grid(row=1, column=0)
entry_prev = tk.Entry(root)
entry_curr = tk.Entry(root)
entry_prev.grid(row=0, column=1)
entry_curr.grid(row=1, column=1)
tk.Button(root, text="Calculate Variation", command=calculate).grid(row=2, columnspan=2)
result_label = tk.Label(root, text="")
result_label.grid(row=3, columnspan=2)
root.mainloop()
Image Explanation
✅ Image 1 – GUI Window
Displays the app interface built with Tkinter, where the user enters previous (e.g., 10) and current sales (e.g., 15). Clicking Calculate Variation shows both manual and NumPy calculation results below the button.

✅ Image 2 – Comparison Chart
Shows a bar chart comparing manual calculation and NumPy result, validating consistency and offering clear visual insights for presentations.
Conclusion
Python GUI libraries unlock the full potential of your scripts, turning them into applications with immediate business value.
Choosing the right library, integrating robust calculations, and presenting results graphically create impactful tools for real-world needs.
🔔 Final reflection:
Python’s true power lies in its ability to integrate simple syntax, strong computation, and user-friendly interfaces into cohesive, production-ready solutions.
Follow & Connect
Izairton Vasconcelos is a technical content creator with degrees in Software Engineering, Business Administration, and Statistics, as well as several specializations in Technology.
He is a Computer Science student and Python specialist focused on productivity, automation, finance, and data science. He develops scripts, dashboards, predictive models, and applications, and also provides consulting services for companies and professionals seeking to implement smart digital solutions in their businesses.
Currently, he publishes bilingual articles and tips in his LinkedIn Newsletter, helping people from different fields apply Python in a practical, fast, and scalable way to their daily tasks.
💼 LinkedIn & Newsletters:
👉 https://www.linkedin.com/in/izairton-oliveira-de-vasconcelos-a1916351/
👉 https://www.linkedin.com/newsletters/scripts-em-python-produtividad-7287106727202742273
👉 https://www.linkedin.com/build-relation/newsletter-follow?entityUrn=7319069038595268608
💼 Company Page:
👉 https://www.linkedin.com/company/106356348/
💻 GitHub:
👉 https://github.com/IOVASCON