Articles on Trending Technologies

Technical articles with clear explanations and examples

How to receive thread callbacks in Python?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 3K+ Views

Multithreading is a powerful concept in programming, allowing developers to execute multiple tasks concurrently and improve overall program performance. In Python, the threading module provides a convenient way to implement multithreading. When working with threads, it's often necessary to receive callbacks to handle events or synchronize the execution of different threads. In this tutorial, we'll explore various techniques for receiving thread callbacks in Python. Threads in Python Before delving into thread callbacks, let's briefly review the basics of threading in Python. The threading module offers a high-level interface for creating and managing threads. Threads are lightweight processes that ...

Read More

How to move button outside of its parent with tkinter?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 390 Views

While Tkinter excels in creating dynamic applications, certain challenges arise when attempting to manipulate the positions of widgets. In this tutorial, we will explain an advanced Tkinter technique and show how you can move a button beyond its parent's confines using Toplevel windows. Understanding Tkinter Hierarchy Tkinter follows a hierarchical structure where widgets are nested within their parent widgets. A widget's position and visibility are constrained within the boundaries of its parent. This limitation can be a hurdle when attempting to move a widget outside its parent's area. However, by utilizing Toplevel windows, we can create a workaround ...

Read More

How to listen to terminal on a Tkinter application?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 2K+ Views

Combining the power of a terminal within a Tkinter application can enhance its functionality and versatility. In this tutorial, we will explore how to integrate terminal functionality into a Tkinter application using Python's subprocess module with a practical example. To comprehend the integration process, it's essential to have a clear understanding of the core components involved − Tkinter − Tkinter, the de facto GUI toolkit for Python, equips developers with a comprehensive set of tools and widgets for building graphical applications. The subprocess Module − Python's subprocess module is pivotal for ...

Read More

How to make tkinter frames in a loop and update object values?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 1K+ Views

In this tutorial, we will explore the dynamic creation of Tkinter frames in a loop and the real-time update of object values within these frames. We'll walk through a practical example — building a dynamic task manager that allows users to manage a list of tasks with toggling statuses. Setting up Tkinter and Task Class Tkinter comes pre-installed with Python, so no separate installation is needed. Let's define a simple Task class representing a task with a name and a status — import tkinter as tk class Task: def __init__(self, name, ...

Read More

How to Separate View and Controller in Python Tkinter?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 3K+ Views

GUI applications often require a clear separation between the presentation of data (view) and the application logic (controller). In Python's Tkinter, separating the View from the Controller is important for writing scalable code. In this tutorial, we will explore the concept of separating the view and controller in a Tkinter application and provide a practical example of a to-do list application. Understanding the MVC Design Pattern The Model-View-Controller (MVC) design pattern is a software architectural pattern commonly used in GUI applications. It divides the application into three interconnected components ? Model − Represents the application's data ...

Read More

How to Style and Customize the tkinterguizero Menu Bar?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 730 Views

Tkinter and Guizero are popular Python libraries for creating GUIs, and when it comes to enhancing the user experience, customizing the menu bar is a key consideration. In this tutorial, we'll explore techniques for styling and customizing menu bars in both Tkinter and Guizero. Understanding Tkinter and Guizero Before diving into customization, let's have a brief overview of Tkinter and Guizero. Tkinter − Tkinter is the standard GUI toolkit that comes with Python. It provides a set of tools for creating graphical user interfaces and is widely used for developing desktop applications. Tkinter includes various widgets, ...

Read More

How to use Tkinter to open file in folder using dropdown?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 772 Views

In this tutorial, we'll explore how to use Tkinter to build a simple file viewer that allows users to open files from a specific folder using a dropdown menu. By the end of this tutorial, you'll have a better understanding of Tkinter and how to create interactive file selection interfaces. What is Tkinter? Tkinter is the standard GUI toolkit that comes with Python. It provides a set of tools and widgets for creating graphical user interfaces. Tkinter comes pre-installed with Python, so no additional installation is typically required. Basic File Viewer Implementation Let's create a basic ...

Read More

How to Update Python Standard Library Packages with pip?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 3K+ Views

Python has a rich Standard Library that provides a broad array of modules and packages. However, it's important to understand that true Python Standard Library modules cannot be updated independently using pip. In this tutorial, we'll clarify this misconception and show you how to properly manage packages in your Python environment. Understanding the Python Standard Library The Python Standard Library is a collection of modules and packages that are included with every Python installation. These modules cover a wide range of functionalities, from working with file systems to handling data structures and performing network operations. Standard Library ...

Read More

How to use Python tkSimpleDialog.askstring?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 4K+ Views

In Python, the Tkinter library provides a robust set of tools for building GUIs, and tkSimpleDialog.askstring is one such tool that facilitates user input through a simple dialog box. Understanding Tkinter and Simple Dialogs Tkinter is a standard GUI toolkit for Python that allows developers to create desktop applications with ease. It provides a variety of widgets, including buttons, labels, and entry fields, to build interactive interfaces. Tkinter's simpledialog module specifically focuses on providing simple dialogs for user interaction, and askstring is one of the functions it offers. Basic Usage of askstring The askstring function is ...

Read More

How to use two different TTK themes in one Tkinter root window?

Gaurav Leekha
Gaurav Leekha
Updated on 27-Mar-2026 739 Views

The ttk module within Tkinter provides themed widgets that enhance the visual aesthetics of your application. While Tkinter allows you to apply a global theme for your entire application using ttk.Style, using multiple themes within the same Tkinter root window can be a bit tricky. This tutorial explores a workaround to achieve this by applying different themes to different frames within the main window. Understanding Tkinter Themes In Tkinter, the ttk.Style class is responsible for managing styles and themes. The theme_use() method is used to set the theme for the entire application. However, when you set the theme ...

Read More
Showing 1–10 of 61,303 articles
« Prev 1 2 3 4 5 6131 Next »
Advertisements