fvm.helpers module

Warning

Callables that are not documented in the Public API are not intented to be directly used and thus may change between minor versions.

Helper functions for FVM

fvm.helpers.get_fvm_shortversion()[source]

Returns the short version number (major.minor) of the FVM

fvm.helpers.get_fvm_version()[source]

Returns the full version number (major.minor.patch[.others]) of the FVM

fvm.helpers.getscriptname()[source]

Gets the absolute path of the called python script

fvm.helpers.insert_line_after_target(file, target_line, line_to_insert)[source]

Inserts a line after the first occurrence of target_line in file

fvm.helpers.insert_line_before_target(file, target_line, line_to_insert)[source]

Inserts a line before the first occurrence of target_line in file

fvm.helpers.is_inside_venv()[source]

Returns True if we are inside a venv, false if not

fvm.helpers.is_interactive()[source]

Returns True if running from a python interpreter and False if running from a script

fvm.helpers.readable_time(seconds)[source]

Converts seconds into a readable format with up to 2 fields. Suppresses the second field if its value is zero. Uses singular or plural automatically.