Previous topic

Generated API Documentation

Next topic

mmf.archive

This Page

mmf

archive This is an idea for a model of objects that save their state.
async Asynchronous components.
contrib External contributions.
examples
fit
interfaces Various Interfaces.
math
objects This file contains a set of classes and meta-classes that allow objects to inherit useful functionality dealing with attributes, automatic calculations etc.
physics Routines related to physical problems (not pure math).
plotting
signal
solve Non-linear solvers.
sphinx Tools for working with the sphinx documentation generation system.
utils This file contains a set of utility functions and classes useful

PyMMF package.

This package first checks to see if a flag sys._pymmf_no_init is set. If so, it skips all initializations (this is useful for scripts etc. to disable logging before importing any of :pkg:`pymmf` for example). If initializations are okay, then the package first reads customizations in the file ~/.mmfrc.py as expanded by os.path.expanduser(). This may define the following which control the behaviour of the import. The defaults are shown here:

start_remote_debug = True:
If True, this will also call mmf.async.remote_debug.listen() to set a trap for the SIGUSR1 and SIGUSR2 signals which start the debugger. You can then attach to the process with the winpdb debugger.
using_sphinx = False:
If True, then generated documentation (primarily in mmf.objects.StateVars subclasses) will use sphinx conventions. See also mmf.setup_sphinx().
check_for_sphinx = True:
If True, then, if the command (sys.argv[0]) used to start python ends with ‘sphinx-build, use_sphinx will be set to True.
pp_hosts = <undefined>:
If defined, then mmf.async.pp._HOSTS is set to this value which specifies a set of servers to use for parallel processing. See the mmf.async.pp module for details.
start_logger = True:
If specified, then mmf.utils.logging.start_logging() is called and passed the logging_options dictionary as a set of keyword arguments to start the logging services. See mmf.utils.logging.
logging_options = {}:
Passed to mmf.utils.logging.start_logging() if start_logger is True.
mmf.setup_sphinx(format_for_sphinx=True)[source]

Setup package for sphinx documentation.

  1. Import mmf.sphinx
  2. Set or unset documentation format to support sphinx reST extensions in docstrings depending on format_for_sphinx. These affect the documentation generated for attributes etc. in the mmf.objects.StateVars class.
  3. Return a string that can be executed from within the sphinx conf.py file to customize the sphinx configuration.

The submodules of mmf are not loaded by default: you must explicitly import them to use them. (This is done to improve the import speed.)