【发布时间】:2012-06-29 14:48:38
【问题描述】:
只是做...
from google.appengine.api import background_thread
...就像在official documentation 中一样,对我来说失败了...
<type 'exceptions.ImportError'>: cannot import name background_thread
...从我的后端调用它时。
如何正确导入?
【问题讨论】:
-
您使用的是 Python 2.7 还是 Python 2.5 运行时?
-
Python 2.5... 我从1.6.4. release-notes 了解到这不仅仅是 Python 2.7?
-
嗯;文档似乎并没有表明它只是 python2.7。另一方面,您的导入在 shell-27.appspot.com 上完美运行,而不是在 shell.appspot.com 上。
标签: python google-app-engine backend background-thread