~/talk

Let's Write an IPython Extension (in IPython)

Talkat PyOhio 2020 · 2020-07-25..07-26· [python]
slides:none on file

A live-built IPython extension that prints execution time for every cell is implemented entirely inside IPython using the events API and a single file in .IPython/extensions/timer.py The code registers callbacks on pre_run_cell and post_run_cell, implements load_ipython_extension and unload_ipython_extension, handles a None timer, and fixes duplicate registrations by keeping one instance and by clearing the event callbacks manually; the extension ends up working in the same session.

AI-written summary · about

  1. 0:00Start
  2. 0:44Write an Extension for Ipython
  3. 1:22Extensions
  4. 2:03Make an Ipython Extension
  5. 2:54Edit Magic
  6. 3:29Python Events
  7. 4:34The Load Ipython Extension Function
  8. 6:14Unload an Extension
  9. 7:36The Ipython Object
~/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.