@line_magic<EOL><INDENT>def aimport(self, parameter_s='<STR_LIT>', stream=None):<DEDENT>
modname = parameter_s<EOL>if not modname:<EOL><INDENT>to_reload = self._reloader.modules.keys()<EOL>to_reload.sort()<EOL>to_skip = self._reloader.skip_modules.keys()<EOL>to_skip.sort()<EOL>if stream is None:<EOL><INDENT>stream = sys.stdout<EOL><DEDENT>if self._reloader.check_all:<EOL><INDENT>stream.write("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>stream.write("<STR_LIT>" % '<STR_LIT:U+0020>'.join(to_reload))<EOL><DEDENT>stream.write("<STR_LIT>" % '<STR_LIT:U+0020>'.join(to_skip))<EOL><DEDENT>elif modname.startswith('<STR_LIT:->'):<EOL><INDENT>modname = modname[<NUM_LIT:1>:]<EOL>self._reloader.mark_module_skipped(modname)<EOL><DEDENT>else:<EOL><INDENT>top_module, top_name = self._reloader.aimport_module(modname)<EOL>self.shell.push({top_name: top_module})<EOL><DEDENT>
%aimport => Import modules for automatic reloading.

        %aimport
        List modules to automatically import and not to import.

        %aimport foo
        Import module 'foo' and mark it to be autoreloaded for %autoreload 1

        %aimport -foo
        Mark module 'foo' to not be autoreloaded for %autoreload 1