I am trying to include some of the IPython built-in magic functions to auto reload modules when I am running a script. So I have tried this:
if __IPYTHON__:
%load_ext autoreload
%autoreload 2
But IPython returns:
%load_ext autoreload
^
SyntaxError: invalid syntax
Any idea how to solve this?
Thank you for the link Gall!!! Whit your help I came up with the following solution: