luma.core.cmdline
¶
- luma.core.cmdline.create_parser(description)[source]¶
Create and return command-line argument parser.
- luma.core.cmdline.get_choices(module_name)[source]¶
Retrieve members from
module_name
’s__all__
list.- Return type
list
- luma.core.cmdline.get_display_types()[source]¶
Get ordered dict containing available display types from available luma sub-projects.
- Return type
collections.OrderedDict
- luma.core.cmdline.get_interface_types()[source]¶
Get list of available interface types, e.g.
['spi', 'i2c']
.- Return type
list
- luma.core.cmdline.get_library_for_display_type(display_type)[source]¶
Get library name for
display_type
, e.g.ssd1306
should returnoled
.New in version 1.2.0.
- Parameters
display_type (str) – Display type, e.g.
ssd1306
.- Return type
str or None
- luma.core.cmdline.get_library_version(module_name)[source]¶
Get version number from
module_name
’s__version__
attribute.New in version 1.2.0.
- Parameters
module_name (str) – The module name, e.g.
luma.oled
.- Return type
str
- luma.core.cmdline.get_supported_libraries()[source]¶
Get list of supported libraries for the parser.
- Return type
list
- luma.core.cmdline.load_config(path)[source]¶
Load device configuration from file path and return list with parsed lines.
- Parameters
path (str) – Location of configuration file.
- Return type
list