Util

Helpful Utilities

Functions:

convert_unicode(value)

Resolves python 2 issue with json loading in unicode instead of string

get_holoocean_path()

Gets the path of the holoocean environment

get_holoocean_version()

Gets the current version of holoocean

get_os_key()

Gets the key for the OS.

human_readable_size(size_bytes)

Gets a number of bytes as a human readable string.

holoocean.util.convert_unicode(value)

Resolves python 2 issue with json loading in unicode instead of string

Parameters:

value (str) – Unicode value to be converted

Returns:

Converted string

Return type:

(str)

holoocean.util.get_holoocean_path()

Gets the path of the holoocean environment

Returns:

path to the current holoocean environment

Return type:

(str)

holoocean.util.get_holoocean_version()

Gets the current version of holoocean

Returns:

the current version

Return type:

(str)

holoocean.util.get_os_key()

Gets the key for the OS.

Returns:

Linux or Windows. Throws NotImplementedError for other systems.

Return type:

str

holoocean.util.human_readable_size(size_bytes)

Gets a number of bytes as a human readable string.

Parameters:

size_bytes (int) – The number of bytes to get as human readable.

Returns:

The number of bytes in a human readable form.

Return type:

str