Python 2.7 on Google App Engine, cannot use lxml.etree
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been trying to use html5lib with lxml on python 2.7 in google app engine. But when I run the following code, it gives me an error saying "NameError: global name 'etree' is not defined". Is it not possible to use lxml.etree on google app engine? or am I missing something? app.yaml application: testsite version: 1 runtime: python27 api_version: 1 threadsafe: false handlers: - url: /.* script: index.py libraries: - name: lxml version: "2.3" # I thought this would allow me to use lxml.etree index.py from testhandler import TestHandler