Tag

file paths

1 views collected around this technical thread.

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.

Pythoncross‑platformfile paths
0 likes · 8 min read
Python File Path Handling: os.path and pathlib Guide
IT Services Circle
IT Services Circle
Jun 15, 2024 · Fundamentals

Understanding the History and Usage of Forward Slash (/) and Backslash (\)

This article explains the historical reasons why the forward slash (/) and backslash (\) were chosen as directory separators in different operating systems, their roles in URLs, regular expressions, arithmetic and escape sequences, and practical tips for using them correctly in code.

Operating SystemsURLbackslash
0 likes · 5 min read
Understanding the History and Usage of Forward Slash (/) and Backslash (\)
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.

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