Welcome to CodersLegacy!

Learn! Develop! Contribute!

Welcome to CodersLegacy, a coding site aimed primarily towards aspiring new programmers looking to expand their skill set. How do we intend to achieve this? Read the article to find out!

The Global Interpreter Lock (GIL) in Python: A Comprehensive History

The Global Interpreter Lock, commonly referred to as the GIL, has been one of Python’s most discussed features since its inception. The GIL is a mutex that protects access to Python objects, preventing multiple native threads from executing Python bytecode at once. While it simplifies memory management in CPython, the most widely used Python implementation, … Read more

Unlocking the Power of Multiprocessing in Python

Python is a versatile language that excels in many areas, but when it comes to taking full advantage of multi-core processors, it can sometimes feel like hitting a wall. This is where multiprocessing comes in—a powerful tool in Python’s arsenal that lets you break through the limitations of the Global Interpreter Lock (GIL) and unlock … Read more

Understanding the Switch Case Statement in Python 3.10

Python is known for its simplicity and readability, but one feature it has historically lacked is a native switch case statement, commonly found in other programming languages like C, C++, and Java. Instead, Python developers often relied on a series of if-elif-else statements or dictionaries to emulate switch-case behavior. However, with the release of Python … Read more

Adding Data Files in Nuitka (Python Files, Images, etc)

Nuitka is a Python-to-C compiler that converts Python code into executable binaries. While Nuitka efficiently compiles Python scripts, incorporating data files such as images, audio, video, and additional Python files requires can be a little tricky. This guide outlines the steps to include various data files in a Nuitka standalone executable. Basic Setup for Nuitka … Read more

How to make ttk.Treeview Editable (Python)

In this tutorial we will explore how to make the Tkinter Treeview Widget, “Editable”. In a previous tutorial, we wrote the following code to represent Product data in a Tabular format using the Treeview widget. But the problem with this approach, is that there is no way of editing the Table from the user’s perspective. … Read more

Tkinter Table Widget using Treeview (Python)

In this tutorial we will explore how to create a Table using the Treeview Widget in Tkinter. The Treeview widget is a versatile widget used to display hierarchical data in a tabular format. It allows for the creation of columns with headings and supports features such as sorting, selection, and editing of data entries. This … Read more

Exploring Data Tables in Tkinter with PandasTable

In this tutorial, we will delve into the powerful combination of Pandas and Tkinter through the PandasTable library. PandasTable provides a convenient way to display and interact with pandas DataFrames in a Tkinter GUI. Prerequisites: You will also need to install the pandas and pandastable libraries. Run the following commands to do so: Creating Interactive … Read more

Creating a Login Form with PyQt6

In this tutorial, we’ll walk through the process of creating a simple login form using PyQt6, a set of Python bindings for Qt, a powerful GUI toolkit. We’ll create a window with a title, username and password fields, and buttons for registration and login. Additionally, we’ll implement a basic login functionality to check if the … Read more

JavaScript SQLite3 Tutorial for Beginners (Node.js)

In this tutorial we will explore how to set up, install and use the SQLite3 Database in JavaScript. What is SQLite? SQLite is a lightweight, serverless, and embedded relational database management system (RDBMS) that is widely used, especially in applications with moderate data storage needs. SQLite offers several benefits that make it a popular choice … Read more

Switching between Multiple Screens in Tkinter (dynamically)

The following article demonstrates a useful trick in Tkinter to create multiple “screens” (e.g. a login screen, register screen, main page screen) within a single window! Instead of creating a new window for each screen, we will use a single tkinter window, which swaps dynamically between multiple “screens” (represented by frames). This is more efficient … Read more