Tagged articles
OS module
25 articles · Page 1 of 1
This article introduces several essential Python standard‑library modules—including os, shutil, subprocess, signal, sys, platform, logging, getpass, pwd, and grp—explaining their primary functions for file and process management, system information, logging, and user/group queries, and provides concise example code for each.
OS modulePythonfile-management
0 likes · 4 min read

This article provides a concise reference of frequently used Python os and file handling functions, illustrating how to query, manipulate, and manage files, directories, and system attributes for automation tasks with clear code examples.
OS modulePythonfile-management
0 likes · 11 min read

This article introduces Python’s os, sys, and os.path modules, demonstrating how to retrieve the current working directory, create and delete directories, list files, execute system commands, access interpreter information, handle command‑line arguments, redirect I/O, and manipulate file paths with practical code snippets.
OS modulePythonfile handling
0 likes · 4 min read

This guide explains how to open and close files, perform various read and write operations, and manage files and directories in Python using built‑in functions and the os, os.path, and shutil modules, with clear code examples for each task.
File I/OOS modulePython
0 likes · 7 min read

This article demonstrates a simple Python method for identifying and removing duplicate files by leveraging the built‑in os module, explaining how to list directory contents, construct file paths, and use os.remove() to delete unwanted copies, complete with example code and usage notes.
OS modulePythonautomation
0 likes · 4 min read

This guide demonstrates Python techniques for reading, writing, and manipulating various file types—including text, binary, CSV, and JSON—while also covering file existence checks, renaming, deletion, and directory handling using os and shutil modules.
File I/OOS modulePython
0 likes · 5 min read

This article explains how to use Python's os module and python-docx library to recursively traverse a folder hierarchy, read .docx files, search for a specific keyword such as "nan", and output the names of matching documents, with optional performance tips.
OS modulePythonWord Documents
0 likes · 5 min read

This article explains how to list all file names in a specified folder with os.listdir and os.path.isfile, shows a concise list‑comprehension version, and demonstrates how to retain only the largest ZIP file by sorting and deleting others using Python's os and glob modules.
OS modulePythonZIP files
0 likes · 5 min read

This article walks through a Python automation example that uses the os module to collect subfolder names from a specified directory and the openpyxl library to write those names into an Excel workbook, providing full code and explanations.
OS moduleautomationfile-system
0 likes · 4 min read

This article walks through four practical Python approaches—using the OS module, pathlib, shutil, and send2trash—to permanently or safely remove directories on Windows, explaining each method's behavior, required settings, and code examples for reliable folder deletion.
OS modulepathlibsend2trash
0 likes · 6 min read

This guide explains how to view and modify a file's creation, modification, and access timestamps on Windows using Python's os module, os.utime, and the pywin32 library, including code examples and practical considerations.
OS modulePythonfile metadata
0 likes · 7 min read

This article introduces the commonly used Python file handling modules—os, shutil, and zipfile—explaining their key functions, demonstrating path operations, file copying, moving, and compression/decompression with practical code examples to help readers efficiently manage files and directories.
OS moduleTutorialZipfile
0 likes · 4 min read

This article narrates a real‑world incident where a frozen computer leads the author to develop a simple Python antivirus that scans directories, matches files against a virus list, and deletes infected files using the os module, illustrating basic information‑security scripting techniques.
OS moduleTutorialantivirus
0 likes · 6 min read

This article explains Python's built‑in methods for invoking shell commands—including os.system, os.popen, the commands module, and the subprocess module—detailing their return values, usage examples, and when to choose each approach for capturing command output.
Command ExecutionOS moduleshell
0 likes · 4 min read

This article provides a comprehensive guide to Python’s os module, covering its purpose, key functions such as os.name, os.getcwd, os.listdir, and various path utilities, complete with code examples and output screenshots to help readers understand and apply file system operations across platforms.
Code ExamplesOS modulefile handling
0 likes · 7 min read

This article provides a comprehensive guide to Python’s os module, covering its purpose, key functions such as os.name, os.getcwd, os.listdir, and various path utilities, complete with code examples and output screenshots to help readers effectively manage files and directories across platforms.
Code ExamplesOS moduledirectory operations
0 likes · 7 min read

This tutorial walks through creating a Python automation script that scans a given directory, uses the os, glob, and filecmp modules to identify duplicate files, and safely deletes the redundant copies while handling edge cases such as missing files.
OS moduleScriptfile deduplication
0 likes · 6 min read

This article explains how Python can automate everyday file‑management tasks—deleting old files, sorting files by type, and scheduling the process with crontab—by providing clear step‑by‑step code examples that turn repetitive work into a few seconds of effort.
OS moduleautomationcrontab
0 likes · 10 min read

This article introduces Python’s sys and os modules, detailing their most useful functions for runtime configuration, file and path manipulation, process control, and environment handling, and provides clear code examples—including a simple progress bar and a demonstration of sys.argv versus __file__ behavior—to help readers master essential system programming techniques.
OS modulePath manipulationProcess Management
0 likes · 22 min read

This article provides a comprehensive guide to Python's os module, detailing common file and directory operations such as creating folders, listing files, deleting files, and retrieving file attributes, with syntax, descriptions, and code examples for each function.
FilesystemOS modulePath manipulation
0 likes · 22 min read

This guide outlines essential Python os and shutil functions for file and directory manipulation, covering path queries, creation, deletion, permission changes, environment variables, and common file opening modes, providing concise examples for each operation.
FilesystemOS modulePython
0 likes · 3 min read

This guide demonstrates how to verify file and directory existence in Python using the os module, open function with exception handling, and the modern pathlib library, providing clear code snippets and explanations for each method.
Exception HandlingOS modulefile handling
0 likes · 2 min read

This guide walks you through Python’s os module, showing how to create, inspect, rename, and delete files and directories, manipulate paths, work with environment variables, execute system commands, and traverse directory trees using os.walk, all illustrated with clear examples and diagrams.
BackendOS modulePython
0 likes · 5 min read

This guide explains how to use Python's os module, the open function with exception handling, and the pathlib module to reliably determine whether files or directories exist, and how to handle missing‑file errors in a clean, cross‑platform way.
Exception HandlingOS modulePython
0 likes · 3 min read

This guide presents a comprehensive collection of Python's os and shutil functions, file handling methods, and practical code examples to help operations engineers automate tasks, manage files and directories, and improve efficiency in modern IT environments.
OS moduleOperationsPython
0 likes · 11 min read
