Colin's Journal: A place for thoughts about politics, software, and daily life.
It would be nice, if you could take any Python application, and have it run on any platform. It is expected that a Python application, which works under one version of Python, will also work on the next incremental release of Python. This situation however, is not the case.
The first problem I had when moving from Python 2.2 to 2.3 under Fedora Core 2 involved filenames. Filenames under previous versions had been Strings. Under Python 2.3 they sometimes come back as Unicode Strings, which the anydbm module then fails on. This caused PubTal to fail, and was the driving force behind the last release.
The next problem I’ve encountered is really bizarre. In TALAggregator I had a couple of classes that inherit from xml.sax.ContentHandler. They implement startElementNS and friends. They are not, however, directly called from an XML parser, but rather from my own code. When I moved to Python 2.3 these methods would still be called, but the code in them would never get executed. No exceptions are thrown, the code just silently doesn’t work. Changing the names of the methods, or removing the super class, solves the problem.
This issue with TALAggregator meant that half my feeds have not been aggregated over the last 2-3 weeks. I’ve now caught up with those still in the feeds, but I’ll inevitably have missed some posts.
The problem on the multi-platform front affects TimeFormat, and Windows. The root cause is the locale module, and its partial implementation on Windows. I can work around this gap, but the fact that it isn’t documented is unfortunate.
As a change from Venice here’s a daffodil taken at the beginning of the month.
Email: colin at owlfish.com