assembl.scripts.ini_files module

Generate various secondary INI files from the main INI file.

assembl.scripts.ini_files.asParser(fob, interpolation=None)[source]

ConfigParser from a .ini filename or open file object. Idempotent.

assembl.scripts.ini_files.combine_ini(config, overlay, adding=True)[source]

Overlay values of the second ini file on the first.

Returns a ConfigParser object If adding is false, only existing values will be replaced.

assembl.scripts.ini_files.compose(rc_filename, random_file=None)[source]

Compose local.ini from the given .rc file

assembl.scripts.ini_files.diff_ini(first, second, diff=None, existing_only=False)[source]

Diff ini files

Generate a parser with any value in the second that is different in the first. Returns a ConfigParser. Takes interpolation into account. Does not include values that disappeared.

assembl.scripts.ini_files.dump(ini_file)[source]

Dump the ini file, showing interpolations and errors.

assembl.scripts.ini_files.ensureSection(config, section)[source]

Ensure that config has that section

assembl.scripts.ini_files.extract_saml_info(rc_info)[source]

Extract SAML variables from the state

assembl.scripts.ini_files.generate_ini_files(config, config_fname)[source]

Generate the circusd.conf from its template and .ini file.

assembl.scripts.ini_files.iniconfig_to_rc(parser, dest=None, extends=None, target_dir=None)[source]

Convert a ConfigParser to a .rc file.

That file is written to dest, or to a returned file-like object extends specifies an extended ini file.

assembl.scripts.ini_files.migrate(rc_filename, expected_ini, random_file=None, target_dir=None)[source]

Create a overlay.rc file from the local.ini and a base .rc file

assembl.scripts.ini_files.migrate_beaker_config(random_ini, overlay)[source]

Migrate old-style session… to beaker.session…

assembl.scripts.ini_files.populate_random(random_file, random_templates=None, saml_info=None)[source]

Populate random.ini

Create missing random values according to the template Do not change existing values

assembl.scripts.ini_files.rc_to_ini(rc_info, default_section='app:idealoom')[source]

Convert a .rc file to a ConfigParser (.ini-like object)

Items are assumed to be in app:idealoom section,

unless prefixed by “{section}__” .

Keys prefixed with an underscore are not passed on. Keys prefixed with a star are put in the global (DEFAULT) section. Value of ‘__delete_key__’ is eliminated if existing.