> 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.toollist.md).

# ToolList

属性：

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

方法：

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

## ***class*** **Leap.ToolList**

ToolList 类继承自 Python 数组来表示一系列 Tool 对象。

通过 `Frame.tools` 来获取一个 ToolList 对象。

```python
all_the_tools = frame.tools
for tool in all_the_tools:
    # ... 使用 tool
```

*New in version 1.0*

### 构造函数

*classmethod* **ToolList**() 构造一个空列表。

从一个 Frame 对象中获得包含跟踪工具的 ToolList。

```python
all_the_tools = frame.tools
```

*New in version 1.0*

### 属性

#### is\_empty

类型：boolean

表示一个列表是否为空。

```python
if not frame.tools.is_empty:
    # 使用 tool
```

*New in version 1.0*

\--

#### frontmost

类型： Tool

z 轴坐标最小的列表项。

```python
most_forward_tool = frame.tools.frontmost
```

*New in version 1.0*

\--

#### leftmost

类型： Tool x 轴坐标最小的列表项。

```python
tool_with_smallest_x = frame.tools.leftmost
```

*New in version 1.0*

\--

#### rightmost

类型： Tool x 轴坐标最大的列表项。

```python
tool_with_ largest_x = frame.tools.rightmost
```

*New in version 1.0*

### 方法

#### append(*other*)

将制定的 ToolList 成员添加到 ToolList 中。

参数：**other**（*ToolList*）—— 一个 ToolList 对象包含的 Tool 对象会添加到 ToolList 的末尾。
