These are chat archives for ipython/ipython

30th
Jun 2018
Lukasz Balcerzak
@lukaszb
Jun 30 2018 09:29

Hey guys, does anyone know how to programatically configure extension? Basically I want to run:

%load_ext autoreload
%autoreload 2

as a Python script. I know how to load extension:

import IPython
shell = IPython.get_ipython()
shell.extension_manager.load_extension('autoreload')

but am struggling to find API responsible for extension config. Can anyone help me with that?

(I can probably prepare autoreload.AutoreloadMagics myself and call shell.register_magics(...) but maybe there is some easier way ?)