> For the complete documentation index, see [llms.txt](https://changkun.gitbook.io/leapmotion_v2_cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://changkun.gitbook.io/leapmotion_v2_cn/yu-yan/python/api-can-kao/leap.devicelist.md).

# DeviceList

属性：

* [is\_empty](/leapmotion_v2_cn/yu-yan/python/api-can-kao/leap.devicelist.md#is_empty)

方法：

* [append()](/leapmotion_v2_cn/yu-yan/python/api-can-kao/leap.devicelist.md#append)

## ***class*** **Leap.DeviceList**

DeviceList 继承自 Python 数组来表示一系列 Device 对象。

通过调用`Controller.devices()`来获得一个 DeviceList 对象。现在，这个列表只包含一个设备，无论你连了多少个设备到电脑上。

*New in version 1.0.*

### 构造函数

*classmethod* **DeviceList**() 构造一个设备的空列表。

*New in version 1.0.*

### 属性

#### is\_empty

类型：boolean

返回一个列表是否为空。

```python
if not controller.devices.is_empty:
    device = controller.devices[0]
```

*New in version 1.0.*

### 方法

#### append(*other*)

添加一个指定的 DeviceList 成员到 DeviceList 中。

参数：**other**(DeviceList) - 一个 DeviceList 对象包含 Device 对象会添加到 DeviceList 的末尾。

*New in version 1.0.*
