Archives For ipython

Edit your ipython config file and add/edit
c.TerminalInteractiveShell.confirm_exit = False

Note: If you do not have have a config file, run ipython profile create to create one.

If you have the latest version of iPython installed >=.12 , you can reload modules automatically.

# Run the commands below in the terminal
ipython profile create # tells you where config file is located

# edit the file with vim or nano
vim ~/.ipython/profile_default/ # The file location can be different
# Change the extensions and exec_lines to include autoreload
#c.InteractiveShellApp.extensions = []
c.InteractiveShellApp.extensions = ['autoreload']
#c.InteractiveShellApp.exec_lines = []
c.InteractiveShellApp.exec_lines = ['%autoreload 2']

Now if you make edits in your code, it should reload the modules. In a testing environment, this is great, but I suggest that you do not do it in a production environment.