Util¶
Helpful Utilities
Functions
convert_unicode (value) |
Resolves python 2 issue with json loading in unicode instead of string |
get_holodeck_path () |
Gets the path of the holodeck environment |
get_holodeck_version () |
Gets the current version of holodeck |
get_os_key () |
Gets the key for the OS. |
human_readable_size (size_bytes) |
Gets a number of bytes as a human readable string. |
-
holodeck.util.
convert_unicode
(value)¶ Resolves python 2 issue with json loading in unicode instead of string
Parameters: value ( str
) – Unicode value to be convertedReturns: Converted string Return type: ( str
)
-
holodeck.util.
get_holodeck_path
()¶ Gets the path of the holodeck environment
Returns: path to the current holodeck environment Return type: ( str
)
-
holodeck.util.
get_holodeck_version
()¶ Gets the current version of holodeck
Returns: the current version Return type: ( str
)
-
holodeck.util.
get_os_key
()¶ Gets the key for the OS.
Returns: Linux
orWindows
. ThrowsNotImplementedError
for other systems.Return type: str
-
holodeck.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