pymovements.stimulus.WritingSystem.from_descriptor#
- static WritingSystem.from_descriptor(descriptor: str) WritingSystem[source]#
Create a WritingSystem instance from a descriptor string.
Mapping is as follows:
left-to-right,ltr: vertical left to rightright-to-left,rtl: vertical right to left
- Parameters:
descriptor (str) – The descriptor string. Valid values are found in
WritingSystem.DESCRIPTORS.- Returns:
The corresponding WritingSystem instance.
- Return type:
Examples
Vertical left to right:
>>> WritingSystem.from_descriptor('left-to-right') WritingSystem(directionality='left-to-right', axis='horizontal', lining='top-to-bottom')
Abbreviations are also supported:
>>> WritingSystem.from_descriptor('ltr') WritingSystem(directionality='left-to-right', axis='horizontal', lining='top-to-bottom')
and
>>> WritingSystem.from_descriptor('rtl') WritingSystem(directionality='right-to-left', axis='horizontal', lining='top-to-bottom')