luma.core.cmdline

luma.core.cmdline.create_device(args, display_types=None)[source]

Create and return device.

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 return oled.

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.get_transformer_choices()[source]
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

class luma.core.cmdline.make_interface(opts, gpio=None)[source]

Bases: object

Serial factory.

bitbang()[source]
bitbang_6800()[source]
ftdi_i2c()[source]
ftdi_spi()[source]
gpio_cs_spi()[source]
i2c()[source]
noop()[source]
pcf8574()[source]
spi()[source]