Archive for June, 2008

Chax 升级到 2.2b1

June 19th, 2008
Tags: | Posted in 5300 | No Comments »

在 #TUMT 得到消息 Chax 升级到 2.2b1。好久不看 MacUpdate 都不知道哪些软件有重要更新。XD

比较有用的改进:

  • 点击 Growl 的提示后能直接转到发消息的窗口,并且焦点在输入框里。在 2.1 中还只是能激活 iChat 而已。
  • 可以在新消息窗口显示前次的消息内容。

赞。尤其是对 Growl 的修正让 iChat 这个本来就很好很强大的软件更加方便。现在的愿望是如果能自定义前次和今次消息之间的分隔符就更好啦(目前是一个比较丑的 <hr />)。

No Comments »

在 Python 中读取 utf-8 文件

June 2nd, 2008
Tags: | Posted in Code | No Comments »

在 Python 中读取 utf-8 文件可以用 codecs 来实现:


    import codecs
    file = codecs.open( "filename", "r", "utf-8" )
    text = file.read()

最近在群里放了一个没头没脑小机器人来玩,说话的时候需要读一些 utf-8 格式的纯文本文件,用到了上边的代码。

jabberbot.png

No Comments »

||

Recent Comments

Flickr Photos (view all)

美国农场一日游美国农场一日游美国农场一日游美国农场一日游美国农场一日游美国农场一日游

About

Me

Zhen (Jon) Sun is a programmer and a blogger. >:-)

Some services I'm using: