Some utilities for getlino.

(This module’s source code is available here.)


add(nickname, package_name[, git_repo, …])

ifroot([true, false])




Volatile object used by getlino.configure and getlino.startsite.



Repo(nickname, package_name, git_repo, …)


class getlino.utils.Repo(nickname, package_name, git_repo, settings_module, front_end)

Bases: tuple

property front_end

Alias for field number 4

property git_repo

Alias for field number 2

property nickname

Alias for field number 0

property package_name

Alias for field number 1

property settings_module

Alias for field number 3

class getlino.utils.Installer(batch=False)

Bases: object

Volatile object used by getlino.configure and getlino.startsite.


If pth (directory or file) exists, remove it after asking for confirmation. Return False if it exists and user doesn’t confirm.

yes_or_no(msg, yes='yY', no='nN', default=True)

Ask for confirmation without accepting a mere RETURN.

runcmd(cmd, **kw)

Run the cmd similar as os.system(), but stop when Ctrl-C.

If the subprocess has non-zero return code, we simply stop. We don’t use check=True because this would add another useless traceback. The subprocess is responsible for reporting the reason of the error.

run_in_env(env, cmd)

env is the path of the virtualenv


Make a file executable

jinja_write(pth, tplname=None, **context)

pth : the full path of the file to generate. tplname : name of the template file to render. If tplname is not specified, use the tail of the output file.