Skip to main content

module_has_submodule

See if 'module' is in 'package'.

def module_has_submodule(
package: module,
module_name: string
) - > boolean

See if 'module' is in 'package'.

Parameters

NameTypeDescription
packagemoduleThe parent package object to search within, which must possess name and path attributes.
module_namestringThe name of the submodule to look for, which can be a simple name or a dotted path.

Returns

TypeDescription
booleanTrue if the specified submodule exists within the package and can be located, False otherwise.