An Admin's Cornucopia - Python Is More Than Just A Better Bash
summary
Shows real code from infrastructure: tiny scripts through a Pyramid + SQLAlchemy inventory app, mixing Python 2.7 and 3.x. Demonstrates atomic rename via a rewrite context manager and why combining that with counting locks breaks (inode vs lock mismatch). Uses structlog, pexpect, execnet, async IO with 100–200 concurrent coroutines for backups, and a C shim to produce small Python binaries later replaced by Rust. Tests run with pytest + vagrant chaos tests that uncovered a bug after 48 hours of 5–10 migrations/sec.
AI-written summary · about
chapters (17)
- 0:00Intro
- 5:36What is Python
- 8:53Context managers
- 12:41String formatting
- 14:09Backup utility
- 15:33Async method
- 16:41struct lock
- 16:56log objects
- 17:50output
- 18:05context annotation
- 18:33Expect
- 19:47SCP Interface
- 20:04ExitNet
- 21:08ChangeOwn
- 21:42Dynamic Linking
- 22:26Summary
- 22:46Thanks








