maha.utils#

Module Contents#

Functions#

get_unicode(text)

Returns the unicode for input text

check_positive_integer(value, var_name)

Raises ValueError if the input value is not a positive integer.

get_unicode(text)[source]#

Returns the unicode for input text

Parameters

text (str) – Text to encode

Returns

Text with characters encoded in raw unicode.

Return type

bytes

check_positive_integer(value, var_name)[source]#

Raises ValueError if the input value is not a positive integer.

Parameters
  • value (float) – Input value

  • var_name (str) – Variable name to include it in the error message

Raises

ValueError – if the input value is not a positive integer.