March 16 2012

Install pygtkglext 1.1.0 (win32)

Pygtkglext comes with two options of installation, one can either go throught the traditional “gcc” way (configure->make->make install) or the “python” way (python build->install).
Let us look at the second one first, the building process would have gone smoothly as long as your remove the out-of-date pkgc_version_check to be found at line-89 and the import of Overrides to be found at line-103 (don’t know if it’s a good idea though). It will generate correctly the ./gtk/gt(d)kgl/gt(d)kglext.c files but will in most cases be blocked by an attribute error some time later as the has undertaken some big changes ever since the release of our beloved package. Two solutions are nevertheless proposed, but are both somewhat, say, arduous.
1. Overwrite the with one of an older version (that is, to find something that dates back to no late than 2004)
2. Modify the pygtkglext file to cope with the CVS HEAD changes to Basically, you want to add ‘install_data’: PyGtkInstallData to the cmdclass dictionary, and move the calls to add_template_option to a class derived from InstallData. (found here)
Continue reading

March 15 2012

Install gtkglext 1.2.0 (win32)

I am using visvis, an excellent and light weight python library for simple 3D visualization in the programme that I’m writing (PyRod).
While it poses no problem under linux, its gtk backend requires the use of pygtkglext and as a result gtkglext, both should be built and installed manually under windows.
The source file can be found here, but at the time when this post was being written, these files have not been touched for at least 6 years…
It took me some time to find out how to do it, so I hope this post to be at least of some help to others…
Continue reading

February 13 2012

Generate python (using pygtk) executables using py2exe (win32)

I’m getting old…real old…now I need to write everything down in case they somehow slip my mind…
I’ve been trying to generate executables for my little program written in Python, under both x64 and Linux(Ubuntu 11.04), and with various programs…but I haven’t been really successful, despite the fact that I might not have put in enough effort as well… As a matter of fact, none of my executable really works on others’ machine. (works perfect on my own PC though)
Anyway, now there is something which seems to be working…the environment is x86 this time…with the help of py2exe
So again, I’m getting old, and I’m writing it down…
For record, the following is basically a combination of several recipes found on the web, I don’t really have any personal contribution to this…
So, py2exe should normally work with simple programs, a ‘hello world’ for example…but things just get complicated once PyGtk and Matplotlib are involved…
Let’s have a look at my first…
Continue reading

February 4 2012


五载未归故里 偶翻家谱 居然傍上了濂溪先生
濂溪先生即周元公敦颐(1017-1073) 出淤泥而不染便是出自此公之口
话说这元公有二子 长名寿 次名焘
绍兴之翔宇 豫才皆为焘之世孙 吾祖孝琚亦源于焘一支
孝琚始徙西山 子孙百余人 此处恕不赘述
其有第八世孙国行 国行生二子
长子子孙繁庶 瓜瓞绵延
次子士新 传至吾辈二十三世 唯余一人

December 27 2011

Trip(Leukerbad — Jungfrau — Zermatt)

Day 1 : Leukerbad

Leukerbad (French: Loèche-les-Bains) boasts the biggest thermal baths in Switzerland with about 3.9 million liters gushing out each day from what is considered to be Europe’s largest reservoir of thermal water. Thermal bath is generally available and for free in local hotels, but finding yourself in, say, even the largest resort isn’t gonna cost you much either. With 21CHF (at Linder Alpentherme), you can enjoy 3 hours in both the indoor and the outdoor pools (28 CHF for a day, unlimited, as in our case).
Since I didn’t bring the camera to the pool, only the outside view (middle & right image) is shown here. It snowed heavily that day, just about perfect to experience the true essence (my personal definition…) of alpine thermal bath: Imagine you have snow falling down and melted upon dropping on your shoulder while the rest of your body is kept well warm in the thermal bath…
Oh yes, we (Yinbin and I) did try burying our bodies in the snow for as long as we can before throwing ourselves back into the thermal water, and I won that contest…

Continue reading

December 20 2011

Grenoble (last updated 201211)

Grenoble is the name of the city that I live in, it would take hours to describe what it is really like but let me first summerize it into three words, mountains, science and technology or maybe I should let science go first as I never go skiing.
I’ll just put some photos this time cuz otherwise they’ll get rotten in my camera (taken long long long ago)…

October 12 2011

Trip (Bratislava – Smolenice – Vienna)

主要目的 : 8th Autumn School (Conference) on X-ray Scattering from Surfaces and Thin Layers.
地点 : Smolenice城堡 , 斯洛伐克
行程 : 03/10夜抵达斯洛伐克首都Bratislava, 04/10前往Smolenice城堡, 07/10早上离开城堡前往Vienna(维也纳, 奥地利), 09/10下午回到Bratislava, 10/10回Grenoble



从旅馆房间的窗口眺望, 钢筋混凝土砌成的板房和乳白色的中世纪塔楼形成鲜明对比

Continue reading

October 2 2011

Time to post something…

I figured that it might be time to talk about my thesis subject.

Basically, it involves the use of extremely intensive X-ray generated by the so called synchrotron radiation to study Si or Ge nanowire growth mechanisms in situ inside a Ultra High Vacuum chamber (base pressure < 10-10 mbar).

We’ll come to what is a synchrotron radiation, in situ, the characterization methods (GIXD, GISAXS) that are employed as well as the growth mode (CVD, VLS) later (hopefully).

Today, I’ll just leave you with some SEM images of the nanowires grown recently in the above mentioned chamber.


Continue reading

September 22 2011

Pygtk tips (for myself)


I should definitely start to read the manual more attentively…

I ran into a situation where gtk.TreeView.scroll_to_cell() showed no effect. After 15mins’ search, I was pointed back to the manual page, where it writes:if a child has native scrolling (TreeView in my case), should use add() instead of add_with_viewpoint() for gtk.ScrolledWindow, and that solves the problem.

Another problem that I encountered today also involves the use of gtk.TreeView, I found out that the set_cursor() method refused to work for me as well. However, this time I was luckier as I soon (after some debugging) realized that the target colomn of the cell should be fully expanded (i.e. realized) to become a valid target of the method. This problem will only occur if the TreeView.get_model() is a TreeStoreObject (and thus not a ListStoreObject).

September 22 2011

Glype Proxy 1.1

Glype Proxy (current version 1.1) is an easy-to-use, light-weighted, but great still proxy script written in PHP. You can find other scripts on the internet as well, such as PHProxy (project halted on 2007-09-07). However, Glype is likely to be the only one that is still under development (Glype 2.0) and has probably the largest group of users/coders.

I have been using Glype for my own proxy site on Godaddy free hosting for a while. In the following, I will show you briefly how to do it, as well as the solutions to some problems that I’ve encountered.

Moreover, compared to the GAE based proxy which is presented in my latest post, Glype not only handles javascript parsing, but also allows to you play videos on YouTube provided that some specific plugins are installed (no longer necessary in the upcoming 2.0 version).

Continue reading

September 22 2011

WordPress Hide Private Link

Some people (including me) may want to preserve some of his privacy in his blog.

This could easily be done for the posts, that is, you can either hide the entire post by carefully selecting its visibility option, or even hide part of it with the help of some of the plugins (Wp-private being just one of it).

However, WordPress (seemingly from V2.7 to at least V3.0) behaves abnormally when you try to keep your links (in the link widget) private. It turns out that the private links are invisible even to the administrators.

Solutions were proposed (plural form is used despite that I found only one on the web), but are mostly lengthy, and/or complicated for beginners. In this post, we will try to solve the problem in a more straight-forward way, thanks to a handy plugin, called BP links+.

Continue reading

September 22 2011

Google App Engine – HTTP Proxy Server

This is merely a translated (Chinese) version of “How to setup your own proxy server in 5 minutes for free
More can be found on
In addition, temporary solutions are presented here (in the end in English) to some frequently occured problems which are not given in the original post, so are some common issues related to the basic operations concerning GAE.


写这篇Post有几个目的,首先,基于这个idea来建立Proxy Server的帖子实在很多,尤其是中文的,不过部分文章直接使用appcfg.py来进行上传更新等操作,给从未接触过python环境的用户带来了不便。


Continue reading

September 22 2011

Recommended WP plugins (updated 13/02/2012)

In this post, I’ll briefly introduce (in alphabetic order) the WordPress plugins that “take service” on my site.

Add From Server

This is the very plugin that you should resort to if you are p***ed off (oops=.=) by the HTTP error when uploading new files to the Media Library. I have tried different methods that I found on the web, but none of them seemed to be working. With Add From Server however, you are now allowed to add an existing file (uploaded using other means, ex. ftp) to the library (who originally recognize only the files uploaded via the WP interface) with a simple click.
Continue reading