在我的项目中,我想导入命令,因此我将以下代码放入我的项目中:
\n\nimport commands\nRun Code Online (Sandbox Code Playgroud)\n\n但是我得到了错误:
\n\nNo module named commands less... (\xe2\x8c\x98F1) \nThis 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.\nRun Code Online (Sandbox Code Playgroud)\n
从文档中:
自版本 2.6 起已弃用:命令模块已在 Python 3 中删除。请改用 subprocess 模块。
您可以点击此链接: https ://docs.python.org/2/library/commands.html