Files
python-gpiozero/gpiozero/__init__.py
Dave Jones fa0a1b3cdd Fix #76, fix #79
This finishes off implementing values and source for all (current)
classes in gpiozero. I'm afraid things get rather complex in this
commit. For starters, we've now got quite a few "aggregate" classes
which necessarily don't descend from GPIODevice. To implement values and
source on these I could either repeat a helluva lot of code or ... turn
to mixin classes. Yeah, it's multiple inheritance time, baby!

Unfortunately multiple inheritance doesn't work with __slots__ but we
really ought to keep functionality that they provide us (raise
AttributeError when an unknown attribute is set). So I've implemented
this with ... erm ... metaclasses. Sorry!
2015-10-22 21:44:42 +01:00

44 lines
677 B
Python

from __future__ import (
unicode_literals,
print_function,
absolute_import,
division,
)
from .devices import (
GPIODeviceClosed,
GPIODeviceError,
GPIODevice,
)
from .input_devices import (
InputDeviceError,
InputDevice,
Button,
MotionSensor,
LightSensor,
TemperatureSensor,
AnalogInputDevice,
MCP3008,
MCP3004,
)
from .output_devices import (
OutputDeviceError,
OutputDevice,
PWMOutputDevice,
PWMLED,
LED,
Buzzer,
Motor,
RGBLED,
)
from .boards import (
LEDBoard,
PiLiter,
TrafficLights,
PiTraffic,
FishDish,
TrafficHat,
Robot,
RyanteckRobot,
)