Hello world!
2009-06-29 09:08:33
查看原文
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
web.py sucks
2008-12-26 15:04:51
查看原文
web.py might be famous, but it really sucks in performance. I tried code.py from tutorial and was shocked. The `ab -c 10 -n 1000` benchmark shows code.py can only handle 200 request per second. (CherryPy is abo...
Notes on Python Socket Module
2008-12-10 13:46:07
查看原文
I was surprised to see how Python implements socket module in its C level today. Python doesn’t use real connect(2), it implements internal_connect via poll(2). I think it caused by GIL, you can find lots of P...
How to terminate Thread in Python?
2008-12-05 03:18:41
查看原文
The safest way is using threading.Event to avoid sync problem. import threading class TestThread(threading.Thread): def __init__(self): self.stopEvent = threading.Event() def run(self): while not...
玩了下 syslog
2008-12-01 15:28:55
查看原文
写了一个日志模块,Java 的经验告诉我直接用 logging 模块要比自己依赖特定的 logger 没快要好。不过这回碰到 syslog,我就错了。 Python 的标准 logging 模块的确不如直接用 syslog 模块好使。syslog 的接口很简单,后面的工...
Komodo Edit 更新到了 5.0
2008-11-29 11:24:14
查看原文
我不是一个 TextMate 的粉丝,我更喜欢 Komodo Edit,最近出了 5.0 总算接近原生界面了,应该是更新了 Firefox 3.x 用新的 XUL 引擎。 下面来个截图:
三个月的流水账
2008-11-02 07:30:19
查看原文
总算又来更新了,早就知道好久没写了,不过猛一看最新的一篇居然是 7 月 9 号,现在都已经 11 月了啊,时间过得太快了。 7 月份去了中软,头一个月挺闲的,天天无所事事。第二个月开始项目来了,但不小心把手弄伤了,打了两个...
Long time no see, Hessian
2008-07-09 01:40:00
查看原文
Still remember the great company Caucho? Yes, it’s still alive. Besides its flagship product Resin, it also provides some open source libraries. Actually, there are 2 remoting libraries you can use. One is Bur...
Django namespaces hacks
2008-07-08 09:17:46
查看原文
今天把大概一年前写的 Django 程序拿出来做一些改进,主要这一年来 Django 做了重大升级,虽然兼容性非常不错,但是以前代码里面扩展 manage.py 的部分已经可以重写了,因为 Django 提供了 API 来进行扩展。 因为 Django 根据...
Flex Remoting
2008-07-03 04:37:53
查看原文
昨天开始看 Flex 相关的东西,打算把一个现有的 Python Web 应用前端逐渐转换成 Flex。向 咖啡屋的鼠标 了解了下 Flex 如何与后端应用通讯,知道了一个新的协议叫做 AMF,是 Flash/Flex 原生支持的 RPC 协议,而且用起来也要比...