Tagged articles
8 articles
Page 1 of 1
php Courses
php Courses
Apr 10, 2025 · Fundamentals

Python File Path Handling: os.path and pathlib Guide

This article explains how to work with file and directory paths in Python, covering absolute and relative path concepts, the os.path module functions, the modern pathlib API, common operations such as joining, normalizing, traversing, and creating files and directories, and best practices for cross‑platform compatibility.

File PathsPythoncross‑platform
0 likes · 8 min read
Python File Path Handling: os.path and pathlib Guide
Liangxu Linux
Liangxu Linux
Nov 24, 2022 · Fundamentals

Understanding Absolute vs. Relative Paths in Linux: When to Use Each

This guide explains the difference between absolute and relative path expressions in Linux, shows how to write each with practical command‑line examples, compares their advantages in various scenarios such as web development, and offers tips for navigating the Linux directory hierarchy efficiently.

Absolute PathFile PathsRelative Path
0 likes · 6 min read
Understanding Absolute vs. Relative Paths in Linux: When to Use Each
Python Programming Learning Circle
Python Programming Learning Circle
Jun 15, 2021 · Fundamentals

Using pathlib in Python 3 to Handle Cross-Platform File Paths

Python’s pathlib module provides a simple, cross‑platform way to construct and manipulate file paths, eliminating the need for manual slash handling or os.path.join, and offering convenient features such as path arithmetic, file existence checks, and easy conversion between Unix and Windows path formats.

File Pathscodingcross‑platform
0 likes · 7 min read
Using pathlib in Python 3 to Handle Cross-Platform File Paths