Custom Magics for Jupyter

Links: notebook, html ., PDF, python, slides ., GitHub

The following example shows how to define custom logic to your notebooks. You will find more details here: Defining your own magics. It works pretty simple. I just defined the magic commands %ENSAEl, %%ENSAEb and both %ENSAE, %%ENSAE.

from ensae_teaching_cs.mypython.custom_magics import register_magics
register_magics()
%ENSAEl site
ENSAE TD
%ENSAE blog
blog
%ENSAE download stations.txt
downloading of  http://www.xavierdupre.fr/enseignement/complements/stations.txt  to  stations.txt
'stations.txt'

You will find the code there: custom_magics.py.