Duster is an IPython extension that selectively clears one's IPython session namespace while automatically ignoring specified variables to preserve and reloading specified packages.
The package may be installed as follows: :
pip install duster
After installation, the extension may be loaded within an IPython session with :
%load_ext duster
Modules to be reloaded when duster is invoked should each be listed as a tuple containing the module name and the name to which it should be imported (or '' if it should be imported as-is). For example: :
c.DusterMagic.modules = [('numpy', 'np'), ('scipy', 'sp'), ('sys', '')]
Variables to be ignored when resetting the IPython namespace should be listed by name as follows: :
c.DusterMagic.ignore = ['varname0', 'varname1']
The above settings may be viewed and/or modified within an IPython session using :
%config DusterMagic
Duster will automatically reload pylab if pylab mode is active.
The latest release of the package may be obtained from GitHub.
See the included AUTHORS.rst file for more information.
This software is licensed under the BSD License. See the included LICENSE.rst file for more information.