Utils

inveniofab.utils.is_local()

Determine if env.host is localhost

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.run_local(command, shell=True, pty=True, combine_stderr=True, capture=False, warn_only=False)

run/local function based on host

inveniofab.utils.sublime_project

Write sublime project file

inveniofab.utils.sudo_local(command, shell=True, pty=True, combine_stderr=True, user=None, capture=False, warn_only=False)

sudo/local function based on host

Create symlinks specified by CFG_SYMLINKS

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.upload_files

Upload files specified by CFG_FILES

inveniofab.utils.write_template(filename, context, tpl_str=None, tpl_file=None, remote_tpl_file=None, append=False, mark=None, use_sudo=False)

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.