0
我是编程python的新手。我在Linux上建立了Beremiz程序,我得到了这个错误。Python为语法
File "Beremiz.py", line 164, in <module>
from ProjectController import ProjectController, MATIEC_ERROR_MODEL, ITEM_CONFNODE
File "/DATA1/UTILITY/Beremiz/beremiz/ProjectController.py", line 16, in <module>
import connectors
File "/DATA1/UTILITY/Beremiz/beremiz/connectors/__init__.py", line 34
for name in listdir(_base_path)
^
connectors = {name:_GetLocalConnectorClassFactory(name)
for name in listdir(_base_path)
if path.isdir(path.join(_base_path, name))
and not name.startswith("__")}
此语法不是python的构建。什么是问题? 谢谢大家。
哪个Python版本您使用的?您的代码可能会使用较旧版本的Python不支持的一些更新的语法。 – 2012-08-08 01:50:55
这对Python 3.x运行良好,请确保您使用的软件的设计版本。 – Kudu 2012-08-08 02:07:09