此用户输入数学函数 (index.py) 在命令行中工作,它和 app.yaml 文件上传到并确认从 GAE 部署,但会引发内部服务器 500 错误。这些打印语句可以在没有 HTML 的情况下提供吗……那会是导致服务器错误的原因吗?
#!/usr/bin/env python
import cgi
import math
print "Content-type: text/html"
exp = input('Enter base and exponent, separated by comma.\n') 
print '= %d \n' % math.pow(*exp)
应用程序.yaml
application:  python-math 
version: 1 
runtime: python27 
api_version: 1
threadsafe: false 
handlers:
-url: /stylesheets/
static_dir: stylesheets
-url: /.*
script: index.py