删除Python easy_install安装软件

January 12th, 2011 1 comment

python的easy_install是很方便的安装体系,可是一般来说setup.py没有deinstall的选项,那么如何删除已经安装的egg呢? easy_install -mxN Genshi 然后下面类似的提示: install_dir /usr/local/lib/python2.6/dist-packages/ Processing Genshi-0.6-py2.6.egg Removing Genshi 0.6 from easy-install.pth file Installed /usr/local/lib/python2.6/dist-packages/Genshi-0.6-py2.6.egg Because this distribution was installed –multi-version, before you can import modules from this package in an application, you will need to ‘import pkg_resources’ and then use a ‘require()’ call similar to one of these examples, in order to […]

Python.org被墙,替换docs和code下载地址

April 17th, 2010 1 comment

http://www.python.org/download/和http://www.python.org/doc/长久以来被“墙“,替换的下载地址是: Python 2.6.x python 2.6.5 windows installer i386 python 2.6.5 windows installer amd64 python 2.6.5 source code bzipped Python 3.x python 3.1.2 windows installer i386 python 3.1.2 windows installer amd64 python 3.1.2 source code bzipped tarball Docs python 2.6.5 Docs PDF python 3.1.2 Docs PDF

GNU/Linux下更好的使用Thinkpad的键盘灯

August 11th, 2009 no comment

让广大“黑友”的thinklight更好的发挥作用。 Thinkpad屏幕顶部的键盘灯是个很有创意的设计,这个和小红点一起构成了Thinkpad的重要特色功能。 比如收到邮件后,thinklight闪烁;pidgin收到消息后,thinklight闪烁提醒。

django model加入cache

June 12th, 2009 no comment

近来用django开发不少,对其自带自带的”django.middleware.cache.UpdateCacheMiddleware” 和”django.middleware.cache.FetchFromCacheMiddleware”感觉很不爽,原因有两个: 0,cache的过期控制只能通过超时时间进行,而不能主动通知; 1,全页面的cache粒度太粗。