べすとえふぉーと

プログラミング等のノート 

GoogleAppEngine

GAEで既にデプロイ済みのアプリのソースをダウンロード(Python)

基本的な書式 # appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>認証に失敗する場合は--oauth2をつけて実行 appcfg.py download_app -A appname -V 1 /downloaddir --oauth2</output-dir></your_app_version></your_app_id>

GAEで日本語ファイル名を指定してファイル出力

とりあえず例としてContent-Typeはoctet-stream self.response.headers["Content-Type"] = "application/octet-stream; "拡張子はCSV SetHeaderString = 'attachment; filename="' JpStr = u'_日本語ファイル名_'.encode('utf-8') JpStr = urllib.quote(JpSt…

GAEでjsonを出力する

とりあえずいんぽーと import wsgiref.handlers from django.utils import simplejson from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db吐き出す部分 class MainPa…

Pythonで日本語を扱う時によく出るエラー

ascii' codec can't encode みたいなエラーが出た時のおまじない GetString = unicode( TargetString ,'utf_8')とりあえずこれでおk