Skip to content

Add working-with-files-in-python materials folder - #999

Open
realpython-bot wants to merge 2 commits into
masterfrom
maintenance/working-with-files-in-python-20261204
Open

realpython-bot wants to merge 2 commits into
masterfrom
maintenance/working-with-files-in-python-20261204

Conversation

@realpython-bot

Copy link
Copy Markdown
Collaborator

Adds the companion code for Working With Files in Python, which so far had no materials folder.

  • make_fixtures.py builds the sample directories the tutorial uses (my_directory, some_directory, the walk tree, and data/ for the archives)
  • one script per tutorial section, mirroring the code in the update draft (Post 2459: https://realpython.com/pbjt/blog/post/2459/change/)
  • fileinput-example.py with the bacon.txt / cupcake.txt inputs from the article
  • the examples that need a newer Python (Path.copy()/.move() and zst on 3.14+, parent_mode on 3.15+) are skipped on older versions

Card: https://trello.com/c/xLR72AGc

Verification: ran make_fixtures.py and every script on Python 3.15.2 and 3.12 (the article's minimum-python); all exit 0 and print what the article shows, apart from filesystem-dependent listing order and the timestamps. ruff format --check, ruff check (ruff 0.14.1), and dircheck.py pass.

🤖 Generated with Claude Code

realpython-bot and others added 2 commits December 4, 2026 14:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant