- 博客(4)
- 资源 (1)
- 收藏
- 关注
原创 GAE 添加第三方包
<br />使用了zip格式的第三方扩展包simplejson。<br />GAE提供了zipimport第三方库。<br />那么在程序中加入:<br />import syssys.path.insert(0, 'simplejson-2.0.9-py2.6.egg')import simplejson as json 即可。
2010-07-05 14:58:00 840
原创 问题追踪日志: GAE 人人网农网外挂,urllib2转urlfetch(问题已解决)
一开始使用的是urllib2中的urlopen,post数据进行登陆,登陆完后必须保存cookie信息从而使得程序能够保存登陆状态。代码如下:opener = urllib2.build_opener(urllib2.HTTPCookieProcessor()) headers = [('Host', 'www.renren.com'), ('User-Agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows
2010-07-05 14:36:00 2097
原创 Python学习 Tip摘录
Python有许多的内建函数,例如raw_input,int,str,range,enumerate,open,file,dir,len,id等,这些函数都包含在__builtin__模块内。raw_input 获取用户输入的一行int 把对象转换为intstr 把对象转换为strrange 获取一个列表enumerate 获取索引和值,遍历open 打开一个文件dir 获取对象的所有属性名len 获取对象的长度id 获取对象的idcmp 比较两个对象大小type 查看对象类型repr 返回一个对象的字符串
2010-06-28 17:15:00 519
原创 Harmony Class Loader
首先Luncher会初始化一个extension class loader和一个application class loader,并设置当前线程上下文class loader为application class loader。Extension class loader 和 application class loader均为Luncher的内部类,分别为ExtClassLoader和AppClassLoader,ExtClassLoader的parent class loader为null,在双亲委托
2010-06-07 15:09:00 532
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人