~/talk

pathlib: why and how to use it

Talkat PyCon US 2026 · 2026-05-13..05-19· [python]
slides:none on file

Argues that pathlib.Path replaces stringly file handling with a concrete type, shows methods like read_text and mkdir(parents=True), demonstrates joining with the slash operator, and notes copy and copy_into land in Python 3.14 and PEP 519 makes open accept Path on 3.6. Shows interoperability with Django pandas pillow pytest click, warns against Path.open and unnecessary str conversions, and reports a search over 400,000 files where Path performance only degrades after converting all results back to Path objects.

AI-written summary · about

  1. 0:00Introduction
  2. 1:54String-based path problems
  3. 6:54Why pathlib helps
  4. 10:05pathlib vs legacy modules
  5. 13:23How pathlib works
  6. 18:18Usage and best practices
  7. 22:19pathlib mistakes
  8. 24:46Performance and conclusion
~/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.