ElementTree SyntaxError: expected path separator ([)

ElementTree SyntaxError: expected path separator ([),第1张

ElementTree SyntaxError: expected path separator ([)

This may be side-stepping the question, but you could just try copying-and-
pasting the version of ElementTree from Python 2.7, renaming it to avoid
conflicting with the standard library, and importing and using that.

However, since ElementTree isn’t meant to be used as a standalone file, what
you need to do is navigate to

C:Python27Libxml
and copy the entire
etree
folder and import ElementTree by doing
import etree.ElementTree

inside your script.

To avoid accidentally importing or using the version of ElementTree from
Python 2.6, you should probably rename the

etree
folder, its contents,
delete the
.pyc
files, and fix the imports inside the file to reference the
Python 2.7 version.



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5562402.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-14
下一篇 2022-12-14

发表评论

登录后才能评论

评论列表(0条)

保存