sciris.sc_settings

Options for configuring Sciris and Matplotlib.

All options should be set directly or using set(), e.g.:

sc.options(sep='.')

To reset default options, use:

sc.options.default()

New in version 1.3.0.

Functions

default

Helper function to set the original default options

get_help

Print information about options.

help

Get help on Sciris in general, or search for a word/expression.

set_default_options

Set the default options for Sciris -- not to be called by the user, use sc.options.set('defaults') instead.

set_matplotlib_global

Set a global option for Matplotlib -- not for users

set_option

Set a parameter or parameters.

Classes

Options

Small derived class for the options itself

dictobj

Lightweight class to create an object that can also act like a dictionary.

class dictobj(**kwargs)[source]

Lightweight class to create an object that can also act like a dictionary.

Example:

obj = sc.dictobj()
obj.a = 5
obj['b'] = 10
print(obj.items())

For a more powerful alternative, see sc.objdict().

(Note: sc.dictobj() is defined in sc_settings.py rather than sc_odict.py since it’s used for the options object, which needs to be the first module loaded.)

New in version 1.3.0.
New in version 1.3.1: inherit from dict
help(pattern=None, source=False, ignorecase=True, flags=None, context=False, output=False)[source]

Get help on Sciris in general, or search for a word/expression.

Parameters
  • pattern (str) – the word, phrase, or regex to search for

  • source (bool) – whether to search source code instead of docstrings for matches

  • ignorecase (bool) – whether to ignore case (equivalent to flags=re.I)

  • flags (list) – additional flags to pass to re.findall()

  • context (bool) – whether to show the line(s) of matches

  • output (bool) – whether to return the dictionary of matches

Examples:

sc.help()
sc.help('smooth')
sc.help('JSON', ignorecase=False, context=True)
sc.help('pickle', source=True, context=True)
New in version 1.3.0.
New in version 1.3.1: “source” argument