Skip to content

Instantly share code, notes, and snippets.

@rhngla
Last active July 27, 2022 23:04
Show Gist options
  • Save rhngla/78746551d1e1e0ef7ad6f2df70449888 to your computer and use it in GitHub Desktop.
Save rhngla/78746551d1e1e0ef7ad6f2df70449888 to your computer and use it in GitHub Desktop.
IPython startup script
#File will be executed for every new instance of ipython
#Place file in: ~/.ipython/profile_default/startup/startupscript.py
print('loading packages and magics from ~/.ipython/profile_default/startup/startupscript.py')
from IPython import get_ipython
get_ipython().run_line_magic("load_ext","autoreload")
print('%load_ext autoreload')
get_ipython().run_line_magic("autoreload", "2")
print('%autoreload 2')
@rhngla
Copy link
Author

rhngla commented Jul 27, 2022

Updated for newer IPython versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment