In some cases it is useful to store media files inside the python code itself. For images, PyEmbeddedImage and the script img2py.py work well. But for GIFAnimationCtrl no obvious solution is available, therefore I had to investigate the source code of wx.animate to find one.
Each kernel upgrade causes a pain with vmware. This time (3.7.5 with PAE option) is not an exception. However, only two manual interventions were required to compile vmware kernel modules.
The server with the subversion repository has crashed. Repair takes a few days. How to work during repair? Git isn’t a solution, because man had to switch before the disaster, not after.
My answer is: temporary switch to RCS.
I decided to experiment with OpenOffice automation from Python, found the official PyUNO wiki, followed the “a must read” link PyUNO bridge and tried the proposed hello-world program “hello_world.py“. As it was feared, nothing worked immediately. The error was:
Traceback (most recent call last):
File "hello.py", line 19, in
Sometimes I dump binary data into XML. Being aware of illegal bytes (0-8,B-C,F-1F), I encode everything in base64. But there is a nice alernative way, just revealed by Roger Costello in the xml-dev maillist:
Move any illegal characters into the Private Use Area: for each illegal character add hex E000.
Python standard library xml.etree.ElementTree is convenient to work with a simple subset of XML. Unfortunately for me, this subset does not include processing instructions, therefore an workaround is required.
Read the rest of this entry »
The official way to introduce custom styles to LyX is:
* the layout-file should be located in a special directory,
* after the layout file is changed, the user should:
. - execute re-configure and
. - restart LyX.
This way is too cumbersome for experimenting and developing styles. Fortunately, there is a solution.
I prefer to use TeX from TeXlive distribution, not the default TeX bundled with an operating system. The problem is that rpm and apt tools check dependencies and insist on installing the wrong TeX. To trick the system, a fake package should be made and installed.
vim includes many keyboard layouts, defined as mappings for symbols of the english layout. Unfortunately, these maps are not useful when the base layout is german. QWERTZ vs QWERTY is not the only difference. Now, deutsch-russisch und deutsch-arabisch vim keymaps sind da.
The keys “< " and "^" seem swapped, but otherwise the normal PC german keyboard layout for Mac OS X is here: http://powerbook.blogger.de/2004/01/26/58788/mein-deutsches-pc-tastatur-layout-fr-macosx-103/.
Sometimes vmware makes something very wrong, and X server do not understand the keys CTRL, ALT, SHIFT and similar anymore. Solution: “setxkbmap” without any arguments.
Read the rest of this entry »
From the delta debugging homepage: “With Delta Debugging, we can find failure-inducing circumstances automatically—circumstances such as the program input, changes to the program code, or program executions.” I tried to apply this technique to LaTeX, and surprisingly it worked. The code and samples of the experiment are uploaded on github.
The tools are:
* diffdelta.py: Finding which diff chunk causes an error.
* latexdd.py: Finding a minimal failing example
* stydd.py: sty-bug hunting
In some cases, macports can’t or should not download a file from internet. Instead, it should use an already downloaded local copy. Unfortunately, this use case is not supported, and a workaround is required.
After some system update, vmware stopped working. It wrote some information which modules are loaded, and then silently exited. In a log file “ui-NNNN.log”, I found: “vmui| Caught signal 11″. The stacktrace said only that the crash was likely due to some signal.
I’ve got PostScript files, which does look ok on the screen, but badly printed on Lexamark E232. The letters collide each with other, seems like instead of Helvetica some monospace font is substituted.
The goal of this release is to mark the milestone 1 (on github, as .tar.gz). I wanted to understand the GVM and to check if compilation to PHP is possible. This is done. While the current gambit-php version is very limited (only a few primitives are partially implemented), it covers all the important functionality:
In order to find if I can affect a program through environment variables, I decided to trace all getenv calls and see if there is something interesting. Easy to said, harder to make. Fortunately, it is possible.
XeLaTeX package “fontspec” provides an useful command “AddFontFeature” to add an effect to the curently selected font. Unfortunately, it works only if fontspec is used. Otherwise, a workaround is required. So far here is a draft to make text narrow:
At some moment, my USB WLAN stick stopped working, and the log was polluted by messages like:
usb 6-1: new high speed USB device using ehci_hcd and address 62 hub 6-0:1.0: unable to enumerate USB device on port 1 hub 6-0:1.0: unable to enumerate USB device on port 1
At first, I decided that the stick had broken after years of work, but out of curiousity tried to connect it to every USB port I found. It worked. The stick worked again when plugged into the keyboard, which in term was connected to the KVM.