~/talk

Building useful project utils in Python

Talkat NDC TechTown 2018 · 2018-09-27..09-30· [python]
slides:none on file

Starts from a 450-line bash utility and shows an incremental rewrite into Python that cuts ~19% of the code while making the logic reusable and testable. Demonstrates concrete tools: argparse for CLI, subprocess for running binaries, pathlib for filesystem work, and doctest/pytest for unit tests. Builds a loader file format, a signing tool and a tiny HTTP server to let devices pull multi-device upgrades; the new Python pipeline works in production and eases future features.

AI-written summary · about

  1. 0:00Intro
  2. 0:32Prerequisites
  3. 2:15What scripts are we talking about?
  4. 5:04Why is Python better? - Syntax
  5. 7:50Why is Python better?-Data structures and types
  6. 10:28Why is Python better? - Modularity
  7. 17:29Code organization
  8. 20:24Command-line interfaces in Python
  9. 29:05Runting other programs from Python-subprocess
  10. 31:31Manipulating the flesystem from Python-pathlib
  11. 35:57Writing unit tests in Python-doctest
  12. 38:12Writing unit tests in Python-unittest
  13. 39:00Writing unit tests in Python - pytest
  14. 43:16binst shell script
  15. 44:16System with multiple devices
  16. 49:27Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.