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?
%load_ext autoreloadcan you tab-complete%autoreload?c.InteractiveShellApp.extensions = ['autoreload']andc.InteractiveShellApp.exec_lines = ['%autoreload 2']. This could not help, but it's worth a try.%and then press tabulator key. Then you should see (there is a chance that you don't have this feature) a list of possible commands. This is very basic and also very fast to check. You can also provide some version information (python and iPython).