spinetoolbox.spine_db_editor.helpers

Helpers and utilities for Spine Database editor.

Module Contents

Functions

string_to_display_icon(x)

Converts a 'foreign' string (from e.g. Excel) to entity class display icon.

string_to_bool(x)

Converts a 'foreign' string (from e.g. Excel) to boolean.

Attributes

TRUE_STRING

FALSE_STRING

GENERIC_TRUE

GENERIC_FALSE

spinetoolbox.spine_db_editor.helpers.string_to_display_icon(x)[source]

Converts a ‘foreign’ string (from e.g. Excel) to entity class display icon.

Parameters

x (str) – string to convert

Returns

display icon or None if conversion failed

Return type

int

spinetoolbox.spine_db_editor.helpers.TRUE_STRING = 'true'[source]
spinetoolbox.spine_db_editor.helpers.FALSE_STRING = 'false'[source]
spinetoolbox.spine_db_editor.helpers.GENERIC_TRUE[source]
spinetoolbox.spine_db_editor.helpers.GENERIC_FALSE[source]
spinetoolbox.spine_db_editor.helpers.string_to_bool(x)[source]

Converts a ‘foreign’ string (from e.g. Excel) to boolean.

Parameters

x (str) – string to convert

Returns

boolean value

Return type

bool