class genvid.toolbox.DefaultInstallationFolder

Bases: object

Abstract class to manage the installation folder.

New in version 1.41.0.

RE_VERSION_MATCH = re.compile('(?P<version>(\\d+).(\\d+).(\\d+).(\\d+))')

A compiled regular expression that match a valid Genvid MILE SDK version number.

FOLDER_GUARD_FILENAME: Optional[str] = None

Name of the guard file that must be present in a valid installation folder.

get_default_installation() str

Returns the default installation registered.

set_default_installation(installpath: Path)

Set the default installation registered.


installpath – The new folder path to set. No validation is done on the path.

get_version(folder: Path) str

Return the version of the installation pointed to by folder.


folder – The folder to check for the installed version.


The installed version.

list_registered_installations() Iterable[Tuple[str, str]]

Returns all registered Genvid MILE SDK installations.


An iterable of tuple of the name of the Genvid MILE SDK and its installation folder.

search_for_guardfile(start_dir: Path, *, guardfile: Optional[str] = None) Optional[str]

Lookup for a guard file in start_dir or its parents.

  • start_dir – The folder to lookup.

  • guardfile – The guard file to find. If None, use FOLDER_GUARD_FILENAME

create_guard_file(rootdir: Path, version: str, *, overwrite: bool = True)

Create a guard file in the folder, with the specific version.


FileExistsError – unless overwrite is true.

class sdk_folder.DefaultInstallationFolder

Implementation of genvid.toolbox.DefaultInstallationFolder.