Utils¶
-
inveniofab.utils.
prompt_and_check
(questions, check_func, cache_key=None, stored_answers=None)¶ Ask user for questions, and check answers with supplied function
-
inveniofab.utils.
python_version
()¶ Determine Python version
-
inveniofab.utils.
pythonbrew_versions
()¶ Get all installed Pythonbrew versions
-
inveniofab.utils.
template_hook_factory
(tpl_file, filename, warn_only=True)¶ Factory method for generating hook functions that renders a template, and writes it to a specific location.
Filename may include string replacement like e.g. %(CFG_INVENIO_PREFIX)s.
-
inveniofab.utils.
write_template
(filename, context, tpl_str=None, tpl_file=None, append=False, mark=None)¶ Render template and write output to file
@param filename: File to write @param template: Name of template @param context: Dictionary for the template context (usually just env) @param append: bool, True if you want to append content to file instead of overwriting. @param mark: str, If append is true and mark is defined, then the rendered
template will replace any previous appened version.