Solve Your Problem With Sloppy Python
summary
Shows concrete hacks and code: a mass rename deep dive that uses hard links and string.partition to fix 60 filenames, a replace/enumerate trick to inject spaces, and a switch from os.system to subprocess.run check=True. Demonstrates real scripts that work — provision that installs 140+ packages, Dcamp for Bandcamp/CD Baby zips using taglib, and custom metadata parsers — with examples, commands, and gotchas, so expect runnable recipes rather than theory.
AI-written summary · about
chapters (18)
- 0:00Intro
- 1:47First Fail
- 3:33Guidelines
- 5:09The Problem
- 6:39Hardlinks
- 7:56Creating Hardlinks
- 8:44Making a Backup
- 12:47Elegant API
- 15:28Replace
- 16:25Provision
- 17:08Install
- 20:22Problem
- 21:23Scripts
- 21:46DCamp
- 22:43OldTime Radio
- 24:53Fix Metadata
- 25:10Fail Early Often
- 26:09Questions
related talks
54mEmbrace the Unix Command Line and Supercharge Your PyData Workflow
38mIt Works on My Machine: Writing Python Code for Any Environment
31mOrganizing and Maintaining Your Code-Scape with Python
27mDream in Code
31mThe Unix Chainsaw
36mCLI applications & TDD: Never write scripts again
31mHow to give your Python code to someone else
42mInheriting a Sloppy Codebase: A Practical Guide to Wrangling Chaotic Code
