03 2012 档案

Python GIL
摘要:描述了新、旧Python GIL的实现,及其对多线程程序的影响。 阅读全文

posted @ 2012-03-10 14:50 JesseFang 阅读(2626) 评论(0) 推荐(0)

升级webpy库
摘要:最近将以前的一个webpy程序对其所依赖的webpy库从0.23升级到了最新的0.36,这里做个简单的总结:1)老版本中GET POST函数中使用print函数向客户端输出内容,新版本用return 语句代替了print,即函数返回的字符串就是向客户端的输出内容;简单的替换过程中也得注意到程序控制流可能因为return而提前终止了。2)web.input()默认返回的是unicode字符,一般替换掉web.input函数的实现 1#from3.0web.input()useunicodedefault,wereplaceit2tmp_input=web.input3deforig_input( 阅读全文

posted @ 2012-03-08 15:15 JesseFang 阅读(191) 评论(0) 推荐(0)