module_dir
Find the name of the directory that contains a module, if possible.
Raise ValueError otherwise, e.g. for namespace packages that are split over several directories.
def module_dir(
module: module
) - > string
Find the name of the directory that contains a module, if possible. Raise ValueError otherwise, e.g. for namespace packages that are split over several directories.
Parameters
| Name | Type | Description |
|---|---|---|
| module | module | The Python module object whose filesystem location is being queried. |
Returns
| Type | Description |
|---|---|
string | The absolute path to the directory containing the specified module's source files. |