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 full dotted name of the Python module or package to locate on the filesystem. |
Returns
| Type | Description |
|---|---|
str | The absolute path to the directory containing the module or package, or the current working directory as a fallback. |