2008年4月11日金曜日

Google App Engine 入門1



「Google App Engine」の登場とPaaS--Web 2.5がもたらす変化 2008/04/10 17:27
http://japan.cnet.com/column/pers/story/0,2000055923,20371171,00.htm


1. Google App Engine SDK は Python 2.5 が前提
Python 2.5 をインストール         http://www.python.org/download/

2. SDK をインストール
Google App Engine General Questions http://code.google.com/appengine/kb/general.html
Download the SDK をダウンロード    http://code.google.com/appengine/downloads.html


既にパスは通っている。
C:\>path
PATH=C:\WINDOWS\system32;
C:\Program Files\Google\google_appengine\


3. helloworld を動かす

Docs >Getting Started >Hello, World!
を参考に





3.1  2つのファイルを作成

 C:> cd Documents and Settings\user\My Documents\google
 C:> md helloworld

helloworld ディレクトリに以下の2つのファイルを作成

-helloworld.py-

#!-*- coding:utf-8 -*-
print 'Content-Type: text/plain'
print ''
print 'Hello, world!'


* ローカルでなく、 Google Upload の場合、日本語対応には必要
  [ #!-*- coding:utf-8 -*- ] c.f

-app.yaml -
application: helloworld
version: 1
runtime: pythonapi_version: 1
handlers:- url: /.*
script: helloworld.py

5.  DOS prompt より以下のコマンドを実行 (自動的に webサーバーが起動される)
C:\Documents and Settings\user\My Documents\google>dev_appserver.py helloworld/

6.  ブラウザデアクセスしてみる










7.  DOS prompt の出力の様子

C:\Documents and Settings\user\My Documents\google>dev_appserver.py helloworld/
Allow dev_appserver to check for updates on startup? (Y/n): y
dev_appserver will check for updates on startup. To change this setting, edit C:\Documents and Settings\user/.appcfg_nag

INFO 2008-04-11 11:28:02,328 appcfg.py] Checking for updates to the SDK.
INFO 2008-04-11 11:28:02,733 appcfg.py] The SDK is up to date.
WARNING 2008-04-11 11:28:02,733 datastore_file_stub.py] Could not read datastore data from c:\docume~1\user\locals~1\temp\dev_appserver.datastore
WARNING 2008-04-11 11:28:02,733 datastore_file_stub.py] Could not read datastore data from c:\docume~1\user\locals~1\temp\dev_appserver.datastore.history
INFO 2008-04-11 11:28:02,750 dev_appserver_main.py] Running application helloworld on port 8080:
http://localhost:8080

INFO 2008-04-11 11:31:28,092 dev_appserver.py] "GET / HTTP/1.1" 200 -
INFO 2008-04-11 11:31:28,108 dev_appserver_index.py] Updating C:\Documents and Settings\user\My Documents\google\helloworld\index.yaml
INFO 2008-04-11 11:31:28,171 dev_appserver.py] "GET /favicon.ico HTTP/1.1" 200 -
INFO 2008-04-11 11:31:41,296 dev_appserver.py] "GET / HTTP/1.1" 200 -
INFO 2008-04-11 11:31:42,217 dev_appserver.py] "GET / HTTP/1.1" 200 -
INFO 2008-04-11 11:31:45,296 dev_appserver.py] "GET / HTTP/1.1" 200 -



拡張子 .py が Python と関連付けられている。
以前、install した python22 を uninstall した
際、この情報も削除され
c:> dev_appserver.py が起動しなくなった。

Python.exe に PATH が通っている必要はないが
拡張子 .py との関連付けは必要。










8. 紹介 Vide の様子  ひと昔まえまではこうした雰囲気を味わうには会場のいくしかなかった。

http://code.google.com/appengine/

Announcing Google App Engine at Campfire One on April 7, 2008

Unityでドアの開閉はAnimatorそれともiTween?

Mac Mini M2 の Unity で Sketchup のデータを復元したつづき。 以前、苦労して作成したドアの開閉が動作しないので修復する。 どうやって動かしていたのか、また忘れそうなので記録しておく。             Animator 左右のドア PlaneL,...