Python Is Just a Crowbar
Feb 20, 2025 · 2 min · python , tooling , fundamentals
Everyone frames code as a noble creative act. Build something beautiful. Express yourself. Lovely, and not why Python is on my machine. Python is the crowbar: the thing you swing when you want to open something that does not want to be opened. A crowbar is judged entirely by how little you have to think about it mid-swing.
So most of my Python is small and disposable on purpose. The tool that best captures the job is about thirty lines: it reads /var/log/auth.log, pulls every failed SSH login, and ranks them by source IP. Not clever. But it looks at a system and tells me something true about who is knocking on the door and how often. That is the whole job in miniature: read the logs, find the pattern, understand the story the machine is telling without meaning to.
A few rules I hold even on throwaway tooling, because they are the line between writing scripts and writing tools:
- Functions get docstrings and type hints. Future me is a stranger and deserves a note.
- Anything that matters gets a test. If it is not tested I do not know it works, I just hope it does, and hope is not a finding.
- When something breaks, read the traceback instead of panicking. It is the most honest thing in the entire stack.
Python is not the destination. It is what I use to build everything else: scanners, fuzzers, the glue that ties them together. You do not admire a crowbar. You learn its weight and then you stop thinking about it.