Skip to main content Brad's PyNotes

Posts on Filesystem

  1. Glob Module: Unix-Style Pathname Pattern Matching

    TL;DR

    The glob module finds all pathnames matching a Unix shell-style pattern using wildcards like * (any characters), ? (single character), and [seq] (character ranges), making file discovery and batch operations simple.

  2. OS Module: Operating System Interface for File and Process Operations

    TL;DR

    The os module provides os.listdir(), os.makedirs(), os.environ, os.path operations, and process management functions for cross-platform system interactions and file operations.

    Interesting!

    The os module automatically adapts path separators for different operating systems - os.path.join() uses backslashes on Windows and forward slashes on Unix, making your code truly cross-platform without any changes.