4 ms·
If you use iPython you can enable auto reloading for all your sessions. It works really well - I've been using it for years. You need to know the limitations, b
by aidos 6y ago
If you use iPython you can enable auto reloading for all your sessions. It works really well - I've been using it for years. You need to know the limitations, but on the whole it give huge performance gains when I'm coding.
To enable it add the following to your ipython_config.py:
c = get_config()
c.InteractiveShellApp.exec_lines = ['%autoreload 2']
c.InteractiveShellApp.extensions = ['autoreload']
- breuleux 6y agoYou can also run `jurigged -vm IPython`, for what it's worth (or put `import jurigged; jurigged.watch()` in the config). There are a few edge cases where jurigged will work and not IPython's autoreload, and vice versa. Notably, jurigged updates decorated functions a bit more aggressively and only runs the code diff so it may keep some state that IPython won't.
- elcomet 6y agoI do this too and it's amazing. I also import common packages and classes that I use regularly, such as numpy, os, math, collections...