types
from susi_lib.types import *
# takto sa importujú všetky triedy odtiaľto
Braille
Provides Braille class for work with braille.
- class susi_lib.types.braille.Braille(characters: str | list[BrailleChar])[source]
Represents a string in braille.
Can be subscripted, iterated through, compared for equality, added with other Braille objects, strings or BrailleChars. Can get its length by len function.
Creates Braille object from characters.
Semaphore
Provides Semaphore class for representing strings in semaphore encoding.
- class susi_lib.types.semaphore.Semaphore(characters: str | list[SemaphoreChar])[source]
Represents a string in semaphore.
Can be subscripted, iterated through, compared for equality, added with other Semaphore objects, strings or SemaphoreChars. Can get its length by
len()function.Creates
Semaphoreobject from characters.
Morse
Provides Morse class for representing a string in morse encoding.
- class susi_lib.types.morse.Morse(data: str | MorseSymbol | MorseSequence)[source]
Represents a string in morse.
Can be subscripted, iterated through, compared for equality, added with other Morse objects, strings. Can get its length by len function.
- Parameters:
data (str | MorseSymbol | MorseSequence)
NumberSystems
Provides NumberSystems class for representing strings as numbers.
- class susi_lib.types.number_systems.NumberSystems(characters: str | list[NumberChar], base=10)[source]
Represents a string as number.
Can be subscripted, iterated through, compared for equality, added with other NumberSystems objects, strings or NumberChars. Can get its length by len function.
Symbols
Provides Symbols class for easy converting between encodings of one string.
- class susi_lib.types.symbols.Symbols(characters: str)[source]
Class for storing a string and getting its encodings.
Can be subscripted, iterated through, compared for equality, added with other Symbols objects or strings. Can get its length by len function. Provides functions to get other encodings.
Creates Symbols from characters.
- Parameters:
characters (str) – String to store
- classmethod from_string(string: str) str[source]
Decodes a string in either braille, morse, numbers or semaphore encoding.
- to_number_systems(base: int = 10) NumberSystems[source]
- Parameters:
base (int) – Int base of the desired system (2, 10, 16)
- Returns:
Numbers representation
- Return type: