Skip to content

Top

Top.

Top

Bases: Object

Top Module Reference.

Parameters:

Name Type Description Default
mod BaseMod

Top Module

required

iter

iter(filter_=None, stop=None, maxlevel=None, unique=False, post=False)

Iterate Over All Modules.

Other Parameters:

Name Type Description
filter_

function called with every mod as argument, mod is returned if True.

stop

stop iteration at mod if stop function returns True for mod.

maxlevel int

maximum descending in the mod hierarchy.

unique bool

Just return module once and NOT all instances of it.

post bool

Post-Order Iteration Strategy instead of Pre-Order Iteration Strategy.

get_mods

get_mods(namepats=None, unique=False, base=False)

Return all modules matching namepats.

Iterate top and all its submodules and return matching ones.

Other Parameters:

Name Type Description
namepats Names | None

Iterable with name pattern (including * and ?) or comma separated string

unique bool

Just return every module once.

base bool

namepats must match against module basequalnames instead of qual_name.

get_mod

get_mod(namepats, base=False)

Return the one and just the one hardware module matching namepats.

Iterate over mod and all its submodules and return matching one.

Other Parameters:

Name Type Description
namepats Names

Iterable with name pattern (including * and ?) or comma separated string

base bool

namepats must match against module basequalnames instead of qual_name.

get_stat

get_stat()

Get Statistics.