driverHandler module
Handler for driver functionality that is global to synthesizers and braille displays.
- class driverHandler.Driver(*args, **kwargs)
Bases:
AutoSettings
Abstract base class for drivers, such as speech synthesizer and braille display drivers. Abstract subclasses such as L{braille.BrailleDisplayDriver} should set L{_configSection}.
At a minimum, drivers must set L{name} and L{description} and override the L{check} method.
L{supportedSettings} should be set as appropriate for the settings supported by the driver. Each setting is retrieved and set using attributes named after the setting; e.g. the L{dotFirmness} attribute is used for the L{dotFirmness} setting. These will usually be properties.
Initialize this driver. This method can also set default settings for the driver. @raise Exception: If an error occurs. @postcondition: This driver can be used.
- name = ''
The name of the driver; must be the original module file name. @type: str
- description = ''
A description of the driver. @type: str
- _configSection = ''
The configuration section where driver specific subsections should be saved. @type: str
- terminate()
Save settings and terminate this driver. This should be used for any required clean up. @precondition: L{initialize} has been called. @postcondition: This driver can no longer be used.
- classmethod check()
Determine whether this driver is available. The driver will be excluded from the list of available drivers if this method returns C{False}. For example, if a speech synthesizer requires installation and it is not installed, C{False} should be returned. @return: C{True} if this driver is available, C{False} if not. @rtype: bool
- classmethod getId() str
@return: Application friendly name, should be globally unique, however since this is used in the config file human readable is also beneficial.
- classmethod getDisplayName() str
@return: The translated name for this collection of settings. This is for use in the GUI to represent the group of these settings.
- classmethod _getConfigSection() str
@return: The section of the config that these settings belong in.
- _abc_impl = <_abc._abc_data object>