~/talk

The Hitchhiker's Guide to CLIs in Python

Talkat PyCon US 2020 · 2020-04-15..04-23· [developer-experience]
links:none on file
slides:none on file

Shows how terminal ancestry and live modes cause quirks (canonical vs raw input, echo off, carriage return behavior) and uses stty -a shows modes examples to prove it. Implements a small git-like CLI with subcommands using sys.argv, getopt/argparse, docopt and then Click with decorator-based commands, demonstrates progress bars, colored output, editor prompts, config in XDG dirs and uses packaged to PyPI with twine to publish — each tool and step actually runs and the Click-based CLI works as shown.

AI-written summary · about

  1. 0:00Intro
  2. 0:17In the beginning ...
  3. 2:21teletype
  4. 6:26Signals
  5. 6:41Control characters
  6. 7:03Streams
  7. 7:32stdout and stderr
  8. 8:07Command-line interfaces
  9. 9:13Options
  10. 10:17Standards
  11. 10:33POSIX
  12. 10:45XDG base directory specification
  13. 11:33Standard library
  14. 11:52getopt
  15. 12:23optparse
  16. 12:34PEP 389
  17. 14:04Python Package Index
  18. 17:39Progress bars
  19. 18:20Application folders
  20. 19:14Paged output
  21. 19:45Colored text
  22. 20:42Launching editors
  23. 21:19User prompts
  24. 22:17Testing click code
  25. 22:38Packaging the CLI
  26. 23:14User experience
~/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.