lixinso@lixinso-desktop:~$ adb shell
# mount
# mount
# mount -o remount /dev/block/mtdblock0 /system
# mount
# mount
mount完就可以任意修改删除拉~~~~
另一個更簡單的方法是直接
:~$adb remount
即可
另一個更簡單的方法是直接
:~$adb remount
即可
from google.appengine.ext import db
from google.appengine.ext.db import BadValueError
import datetime, time
from google.appengine.api import users
SIMPLE_TYPES = (int, long, float, bool, dict, basestring, list)
def to_dict(model):
output = {}
if isinstance(model, db.Query):
output = []
for v in model:
output.append(to_dict(v))
return output
elif isinstance(model, list):
output = []
for v in model:
output.append(to_dict(v))
return output
for key, prop in model.properties().iteritems():
value = getattr(model, key)
if value is None or isinstance(value, SIMPLE_TYPES):
output[key] = value
elif isinstance(value, datetime.date):
output[key] = value.strftime("%Y/%m/%d %H:%M")
elif isinstance(value, db.GeoPt):
output[key] = {'lat': value.lat, 'lon': value.lon}
elif isinstance(value, db.Model):
output[key] = to_dict(value)
elif isinstance(value, users.User):
output = {}
methods = ['nickname', 'email', 'auth_domain']
for method in methods:
output[method] = getattr(value, method)()
return output
else:
raise ValueError('cannot encode ' + repr(prop))
return output
import model
rooms= model.Room.all()
self.response.out.write(model.to_dict(rooms))