2011年11月20日 星期日
2011年10月26日 星期三
2011年10月6日 星期四
Google App Engine Parse Zulu Date
在Google App Engine的環境是python 2.5.2
所以datetime.strptime不支援「%f」
因此簡單使用此方式截掉毫秒。
datetime.strptime(string[:string.index('.')], '%Y-%m-%dT%H:%M:%S')
所以datetime.strptime不支援「%f」
因此簡單使用此方式截掉毫秒。
datetime.strptime(string[:string.index('.')], '%Y-%m-%dT%H:%M:%S')
Google App Engine Upload Missing
- url: /images/(.*)
static_files: static/images/\1
upload: static/images/(.*)
在app.yaml中設定的upload沒設定對則Google App Engine不會上傳你得資料夾。
static_files: static/images/\1
upload: static/images/(.*)
在app.yaml中設定的upload沒設定對則Google App Engine不會上傳你得資料夾。
2011年7月15日 星期五
Google App Engine Installation
GAE SDK Version: 1.5.1,最低需求為Python 2.5
Python目前Production版本是2.7和3.2
Windows XP就需要裝2.7才會動,如果裝3.2會沒辦法執行。
會出現錯誤訊息:
NameError: global name 'execfile' is not defined
必須裝2.x才能執行,因此就以最新版的2.7裝了即可執行。
但是在Mac OS X 10.5 Leopard 已經安裝了 Python 2.5。
所以不用另外安裝。
在Windows裝好Python和GAE SDK以後,可能會跟你說找不到Python
這時就把GAE Luncher打開,按Edit -> Preference指定Python路徑到
C:\Python27\pythonx.exe
重開GAE Luncher即可。
Python目前Production版本是2.7和3.2
Windows XP就需要裝2.7才會動,如果裝3.2會沒辦法執行。
會出現錯誤訊息:
NameError: global name 'execfile' is not defined
必須裝2.x才能執行,因此就以最新版的2.7裝了即可執行。
但是在Mac OS X 10.5 Leopard 已經安裝了 Python 2.5。
所以不用另外安裝。
在Windows裝好Python和GAE SDK以後,可能會跟你說找不到Python
這時就把GAE Luncher打開,按Edit -> Preference指定Python路徑到
C:\Python27\pythonx.exe
重開GAE Luncher即可。
訂閱:
文章 (Atom)