get_root_path
Find the root path of a package, or the path that contains a module. If it cannot be found, returns the current working directory.
def get_root_path(
import_name: str
) - > str
Find the root path of a package, or the path that contains a module. If it cannot be found, returns the current working directory.
Parameters
| Name | Type | Description |
|---|---|---|
| import_name | str | The name of the package or module for which to find the root path. |
Returns
| Type | Description |
|---|---|
str | The absolute path to the root directory of the package or module, or the current working directory if not found. |