[注意] 由於需要使用 Python 2.5 的環境,若在 Python 2.6 環境下執行會有錯誤,目前比較簡單的方法是用 Debian lenny 去執行會比較簡單,至於 Ubuntu 10.04 的話,因為預設安裝的是 Python 2.6 要改會有點麻煩。
/tmp$ wget http://googleappengine.googlecode.com/files/google_appengine_1.4.0.zip
/tmp$ unzip google_appengine_1.4.0.zip
/tmp$ mkdir -p helloworld
/tmp$ cat > helloworld/helloworld.py << EOF
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'
EOF
/tmp$ cat > helloworld/app.yaml << EOF
application: helloworld
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: helloworld.py
EOF
/tmp$ ./google_appengine/dev_appserver.py helloworld/