Archive for March, 2007

shut up, you dummy 7-bit Python

Friday, March 23rd, 2007

I’m working on an unicode-aware application. I like to use print to debug programs, but in this case it was nightmare. The most popular result of print was:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xXX in position 0: ordinal not in range(128)

I spent two hours fixing it, and I hope it’s done. The solution is one of the ugliest hack I ever written, but it solves the pain.


How to stop WordPress spam

Monday, March 19th, 2007

My blog is protected by Advanced Textual Confirmation.

* No more spam.
* No complains from the visitors.


XSieve 1.2.0 is released

Monday, March 12th, 2007

XSieve version 1.2.0 is an evolutional update. Few bugs are fixed and several low-level enchancements are made. Two new functions are added to create a testing framework for another project:

* “x:call” calls any XPath function,
* “x:< =>” compares the nodes in the document order.

xmlXPathCmpNodes bug for attributes

Wednesday, March 7th, 2007

I’ve traced yet another libxml2 bug and proposed a fix: xmlXPathCmpNodes bug for attributes.

why to have a forum on a shareware site

Tuesday, March 6th, 2007

I’ve just answered on a question if it worth having a forum on a shareware site. Yes. Here is why:


execute an XPath and get the line numbers

Monday, March 5th, 2007

I’m investigating the structure of an XML file. The best tool is an usual text editor (vim), but I need to look at some specific tags in some specific contexts. The idea is to execute an XPath and somehow to get to the location in the editor. Remembering that I saw something interesting while playing with libxml internals, I re-checked… And bingo! I’ve written a script which executes an XPath and prints the result together with the line number of the source XML file.