SlingAcademy

Python

Python: How to iterate over all files in a directory

Updated: Jan 13, 2024

Overview Working with filesystems is a common task for many Python developers. Whether you’re building a script to automate some tasks, creating a server application, or processing a batch of files, you may need to access and......

Python: Getting the Creation Date of a File/Directory

Updated: Jan 13, 2024

Introduction Working with files and directories is a common task for programmers. In Python, various libraries and modules help developers interact with the filesystem. One task that often arises is the need to find out when a file or......

Python: Calculating total size of a folder and its contents

Updated: Jan 13, 2024

Introduction Calculating the total size of a folder and its contents is a common task in many computing scenarios. Whether you’re monitoring disk usage, performing housekeeping on your file system, or simply curious about the......

3 Ways to Resize Images in Python

Updated: Jan 07, 2024

Introduction Resizing images is a common requirement in software development, especially when dealing with media content, web development, or machine learning data preprocessing. Python, being versatile and supported by robust......

How to Zip/Unzip a Folder using Python

Updated: Jan 07, 2024

Introduction Managing file archives is a common task in software development. Python, with its rich standard library and third-party packages, offers robust tools for zipping and unzipping folders efficiently. This tutorial walks......

Python – Using Pillow to generate images programmatically

Updated: Jan 07, 2024

Overview Creating images programmatically is a critical skill for many developers, designers, and content creators. Pillow, an offshoot of the Python Imaging Library (PIL), simplifies image processing tasks in Python. In this tutorial,......

Python: Adding watermark to images using Pillow

Updated: Jan 07, 2024

Introduction Watermarking images is a practical approach for asserting copyright and guarding against unauthorized use. In Python, the Pillow library streamlines the process, enabling effortless addition of watermarks to your visuals......

How to Get OS Information in Python

Updated: Jan 07, 2024

Introduction Accessing operating system (OS) details can be pivotal for various Python applications, from system monitoring to customizing UIs to align with the OS theme. In this tutorial, we will explore multiple methods and modules......