@line_magic<EOL><INDENT>def automagic(self, parameter_s='<STR_LIT>'):<DEDENT>
arg = parameter_s.lower()<EOL>mman = self.shell.magics_manager<EOL>if arg in ('<STR_LIT>', '<STR_LIT:1>', '<STR_LIT:true>'):<EOL><INDENT>val = True<EOL><DEDENT>elif arg in ('<STR_LIT>', '<STR_LIT:0>', '<STR_LIT:false>'):<EOL><INDENT>val = False<EOL><DEDENT>else:<EOL><INDENT>val = not mman.auto_magic<EOL><DEDENT>mman.auto_magic = val<EOL>print('<STR_LIT:\n>' + self.shell.magics_manager.auto_status())<EOL>
Make magic functions callable without having to type the initial %.

        Without argumentsl toggles on/off (when off, you must call it as
        %automagic, of course).  With arguments it sets the value, and you can
        use any of (case insensitive):

         - on, 1, True: to activate

         - off, 0, False: to deactivate.

        Note that magic functions have lowest priority, so if there's a
        variable whose name collides with that of a magic fn, automagic won't
        work for that function (you get the variable instead). However, if you
        delete the variable (del var), the previously shadowed magic function
        becomes visible to automagic again.