1
我正在Google App Engine中试用简单的Hello World应用程序。我想创建一个单独的类,我将在main.py中导入并使用它。Classes和Google App Engine
main.py:
import helloWorld
helloWorld.hi()
helloWorld.py:
class helloWorld():
def hi():
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
什么解决的办法得到这个工作?
我想这就是他其实是想:)虽然他的类方法签名是错误的:/ – 2013-04-26 22:17:24
@JoranBeasley你说得对,我完全错过了。 – 2013-04-26 22:24:31
谢谢......我认为我遇到的核心问题是yaml文件。出于某种原因,我不能让GAE正确地上传我的其他脚本,每当我尝试导入外部类时,都会给出500错误... – jumbopap 2013-04-26 22:33:39