• 2009-12-27

    python GUI - [python]

    python中可选的几种GUI方案包括wxPython是对wxWindows的封装,PyQT对qt的封装,PyGTK对gtk的封装 ,tkinter,pywin里的win32ui对MFC的封装,还有直接是用pywin或ctypes调用windows的api。 wxPython使用最多,但是有一个问题就是库太大了,加起来有6M。我最喜欢的是用windows API的方式,一切都在我的控制之下,这种感觉很爽,只是开发效率太低,有点折磨人。用py2exe可以将python程序转为exe文件,setu...
    Tag:
  • 2009-12-25

    plain文件依赖是个杯具

    大杯具,初期简单,后期维护痛苦

    Tag:
  • 2009-10-31

    mac os 10.6 升级python2.6.1到2 . 6 . 4

     

    1.用python开发的一定要升级到2.6.4,参考前面的urllib2 bug

    2.一定要从源代码编译,默认configure make 就可以

     不要装二进制的dmg版本,否则自己编译其他python扩展模块,会报找不到init函数的错误,具体原因不清楚,似乎是二进制版本只支持32位带来的问题。

     

    Tag:
  • 2009-10-31

    urllib.urlopen crashes in a thread on Snow Leopard

    python2.6中创建线程 threading,在子线程中调用urllib2.urlopen 会导致python crash。

    此问题在 Mac  OS 10.6 ,python 2.6.2 中出现。

     

    patch 见 http://bugs.python.org/issue6851

     

    注:太背 ,写了一个抓取网页的程序在fedora上...
    Tag:
  • 2009-09-23

    erlang创建进程组示例代码

     

    回答某网友问题

    =========

    问题描述

    我想测试一下erlang的性能,我模拟一个类似于早期网易聊天室群聊那种,所有的消息都会广播到每一个客户端,这里用一个进程对应一个客户端,进程收到消息后什么也不处理,只是不停的收取消息,看他们在内部处理的效率。
    我只是一个入门者,还不会使用OTP,在进程列表维护方面类似这样的处理:
    process_manager(L) -&...
    Tag:erlang
  • 2009-04-24

    perl 安装 DBI 到指定目录,访问 mysql 记录

    1.安装DBI

    perl Makefile.PL Prefix=/pathtoyourdir/

    make

    make install

    2. 安装DBD

    接的指定 mysql_conofig 位置:

    export PATH=$HOME/pkgs/mysql/bin:$PATH

     

    per...
    Tag:
  • 2009-02-18

    编译 MySQL-python MySQLdb注意点

    1.首先编译mysql时

    给静态库加上-fPIC选项,详细解释在这:

    http://bugs.mysql.com/bug.php?id=8796

    命令是

    ./configure --prefix=<where do you want to place your mysql >  --disable-shared  --with-pic

    假设...

    Tag:
  • 2007-12-22

    twisted的epollreactor性能

    线上实际运行情况的比较:

    6000个连接,pollreactor CPU消耗70%左右,epollreactor始终维持在10%以下。

     

    Tag:
  • 2007-10-10

    What I am doing these days - [python]

    配合某人,从今天开始尽量用鸟语。

    I am developing a web framework .I call it "search on rais".Yes, it is a web framework for search engine application. To speed up the dev, it will equipped by a url dispatch, model and view schema ,a effiency but optional network layer.  What is its feature? The main feature is you can write the view or model in cpp or python. All of these are transparent, ...
  • 2007-09-27

    new techs and me

    The new techs  are coming on the scene everyday,and there are many details if you dive into them. Just move swiftly.
    Tag: