似乎 lxml 在 dev_appserver 中对我不可用。我的测试项目是import lxml
用 windows python sdk 1.6.6 构建的。“没有名为 lxml 的模块”。我假设安装了 python 版本,但我有 Python 2.7。
import webapp2
import lxml
class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write('Hello world!')
app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)
===
application: teslxml
version: 1
runtime: python27
api_version: 1
threadsafe: yes
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: main.app
libraries:
- name: webapp2
version: "2.5.1"
- name: lxml
version: latest
==
dev_appserver.py teslxml