speechbrain.utils.superpowers 模块
应谨慎使用的超能力。
此库包含用于导入 python 文件和运行 shell 命令的函数。记住,能力越大,责任越大。
- 作者
Mirco Ravanelli 2020
Aku Rouhe 2021
摘要
函数
从绝对路径导入模块 |
|
此函数可用于在 bash shell 中运行命令。 |
参考
- speechbrain.utils.superpowers.import_from_path(path)[source]
从绝对路径导入模块
- 参数:
path (str, pathlib.Path) – 要导入模块的路径
- 返回:
module – 加载的模块
实现取自
https (//docs.pythonlang.cn/3/library/importlib.html#importing-a-source-file-directly)