~/talk

Elegant Filesystem Interactions in Python using pathlib

Talkat ACCU 2016 · on Saturday, 2016-04-23· [python]
slides:none on file

Pathlib provides first‑class, immutable path objects (added in Python 3.4, still provisional) that let code join paths with use slash operator to join paths, query metadata with .stat/.exists/.is_file/.samefile, and atomically replace outputs by writing to a temp path then renaming (temp-file write then rename to preserve previous file). It adds conveniences like read_text/write_text methods and Path.cwd()/Path.home(), but still requires str(path) for many legacy APIs and lacks a built‑in walk/os.scandir integration.

AI-written summary · about

  1. 0:00Introduction
  2. 1:27Outline
  3. 1:43Why pathlib
  4. 3:21Why use pathlib
  5. 4:34Indepth example
  6. 7:27Overview
~/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.