在我的项目中,我想导入命令,所以我将波纹管代码放在我的项目中:
import commands
但是我得到错误:
No module named commands less... (⌘F1)
This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
从文档:
自2.6版本后不推荐使用:已在Python 3中删除了命令模块。请改用子进程模块。
commands
模块已在python3中删除,你可以检查there:
自2.6版本后不推荐使用:已在Python 3中删除了命令模块。请改用子进程模块。