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