属性:
is_empty
方法:
append()
DeviceList 继承自 Python 数组来表示一系列 Device 对象。
通过调用Controller.devices()来获得一个 DeviceList 对象。现在,这个列表只包含一个设备,无论你连了多少个设备到电脑上。
Controller.devices()
New in version 1.0.
classmethod DeviceList() 构造一个设备的空列表。
类型:boolean
返回一个列表是否为空。
添加一个指定的 DeviceList 成员到 DeviceList 中。
参数:other(DeviceList) - 一个 DeviceList 对象包含 Device 对象会添加到 DeviceList 的末尾。
Last updated 6 years ago
if not controller.devices.is_empty: device = controller.devices[0]