pydevDAG._traversal module — pydevDAG 1.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »

# pydevDAG._traversal module

## pydevDAG.traversal

Traversing the sysfs hierarchy.

`pydevDAG._traversal.` `topology_walk`(top, follow_slaves=True, recursive=True)

  Walk the sysfs directory in depth first search, yielding directories corresponding to devices in sysfs.

  Parameters: | top (str) – directory to begin at follow_slaves (bool) – if True, follow slaves, otherwise, holders recursive (bool) – if False, only show one level

  `top` itself is not in the result.

`pydevDAG._traversal.` `slaves`(context, device, recursive=True)

  Yield slaves of `device`.

  Parameters: | context (Context) – udev context device (Device) – device to start from recursive (bool) – if False, only show immediate slaves
  Returns: | topology walk generator specialized for slaves

`pydevDAG._traversal.` `holders`(context, device, recursive=True)

  Yield holders of `device`.

  Parameters: | context (Context) – udev context device (Device) – device to start from recursive (bool) – if False, only show immediate holders
  Returns: | topology walk generator specialized for holders

### Navigation

- index
- modules |
- next |
- previous |
- pydevDAG 1.0 documentation »
- pydevDAG »
- pydevDAG package »