This is a template to reliably run some code ipython kernel startup.
If your code fails, kernel will fail. Something you can't get done with startup scripts.
Handy to boot Jupyter notebooks and ipython consoles with some code, e.g. for starting some security guardrails.
- Clone the repo
- Copy your startup code to
profile_changes/startup_extensions/extension_example.py
. Theload_ipython_extension
function is not necessary unless you need a handle to ipython. - Copy both files to the default ipython profile with following command
cp -r profile_changes/* $(ipython locate)/profile_default