scitools.modulecheck

Import a set of modules. If modules are missing, one can get these as a comma-separated string, or one can raise exceptions.

See test block for demo of how this module can be used.

scitools.modulecheck.PmwBlt(verbose=0)[source]
scitools.modulecheck.exception(msg, *module_names)[source]

Raise an ImportError exception if modules are missing. Print the names of the missing modules.

scitools.modulecheck.message(module, critical=1, msg=None)[source]

Import a module and write a message if it is missing. critical=0 means that the module is not critical (programs may work without). critical=1 means that the module must be installed. msg is an optional description of the module.

scitools.modulecheck.missing(*module_names)[source]

Check if modules can be imported. Return a string containing the missing modules.

Next topic

scitools.MovingPlotWindow

This Page