Tim Wegener


Online viewable MVL XML vocab lists

With the new vocab file format (MVL) for Madabar Vocab, the wordlists can now be viewed online, using XML+CSS.

Here is a sample set that shows off the kind of things for which you can use attributes...


/python/madabar_vocab | thisentry | comments ()

Third-party Sample Word Lists

There are some vocab lists in WQL format available on the KWordQuiz site. These can be opened in Madabar Vocab. Extra fields can then be added if desired.

On that page there are vocab sets for French, German, Italian, Portugese, Spanish, Swedish, and Polish. There are also lists for US states and capitals, US presidents, the chemical elements and Nobel laureates. They are all copyright Peter B Hedlund, and unfortunately he does not state what license terms they are released under.

I'd like to do a table of the elements within Madabar Vocab as an example of how you can take advantage of having more than two columns. You could have a field for name, a field for the symbol and a field for the atomic number. This would enable you to test yourself on the numbers given symbols, or names given symbols, or names given numbers, etc. It also means you can sort on the different aspects.

/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.7 Released (big one)

A new official release of Madabar Vocab (v0.7) is available on the Download page.


  • Now using new MVL (.mvl) file format
  • Added a CSS stylesheet show that the new MVL format can be viewed easily from a web browser when saved as .xml
  • Metadata (vocab list info, e.g. author, etc.)
  • Numerous bugfixes
  • Added auto-show timeout for plain flashcard quizzes
  • Launch external links in help using a web browser
  • Save size of shortcut palette
  • Keep editing when focus is lost and then returned to the editor
  • Confirmation before overwriting files using Save As (thanks Karl!)
  • Some usability improvements (thanks Kate!)

The big change is the file format. Old files can still be read by selecting the .mml plugin. Please convert your existing lists over to the new format.

I'd like to do a more publicised release soon, so give it a try and let me know about any bugs that need to be fixed.

/python/madabar_vocab | thisentry | comments ()

First official release of Madabar Vocab

The first official release of Madabar Vocab (v0.2) is available on the Download page.

Note: This is only an alpha release, which means the program may crash under certain circumstances and it awaits some more polishing and feature additions.

/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.3 Released

The second official release of Madabar Vocab (v0.3) is available on the Download page.

This is still an alpha release, but it makes a .backup file whenever you save a file now, so you will probably be able to recover your data file if their is a critical error.

Release Highlights

  • New data file plugin architecture (Adding support for new file formats is a bit simpler now.)
  • More graceful handling of critical errors
  • A bug that caused a crash when opening certain files has been fixed
  • Categories are now known as Fields
  • Better error checking


/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.6 Released

The fifth official release of Madabar Vocab (v0.6) is available on the Download page.


  • duplicate answers are prevented in multiple choice quiz mode
  • changed item progress bar to indicate number of items completed
  • fixed problem with adding shortcuts (thanks Karl!)
  • fixed problem reading WQL files with multi-word values (thanks Kate!)
  • fixed problem where dirty bit was not getting set when table was modified
  • fixed a few other little bugs

/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.8 Released (major bug fixes)

A new official release of Madabar Vocab (v0.8) is available on the Download page.


  • Fixed reading/writing of MVL (.mvl) file format (This was majorly broken.)
  • Now works properly with Python 2.4
  • Fixed loading of choice fields
  • Fixed updating of fields when choices are modified
  • Fixed wql reader

If you are using the 0.7 release then upgrade ASAP, as you will lose data when saving to mvl format in the 0.7 version.

I've also fixed the sample vocab set from the Greek of 1 John on the Vocab Lists page.

/python/madabar_vocab | thisentry | comments ()

Parsed Greek 1 John

I've posted a sample word list for Madabar Vocab that I generated from James Tauber's CCAT Morphological Greek New Testament. See the new sample Vocab Lists page for more info.

Although this doesn't have the translations at this stage, it could be quite useful as an aid to studying New Testament Greek. You can easily test yourself on a verb paradigm for instance. Or you could sort on nouns, select them and test yourself just on nouns. (The forthcoming query select feature will make this a bit more convenient.)

I've also included fields for word frequency and lemma (root) frequency. This is really handy together with the sorting feature within Madabar Vocab. You can sort on root frequency and learn the most common words first.

In trying this out I discovered a bug in the sort dialog code ( It is quite easy to fix: just change Category to Field in The fix will be included in the next release, but I want to do some more changes before the next release.

/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.5 Released

The fourth official release of Madabar Vocab (v0.5) is available on the Download page.

This is just a minor bugfix release. It fixes up the Find dialog. It also fixes some problems with Python 2.2 and Qt 3.1, so it should work on Red Hat Linux 9 now.

I discovered a GPL packaged version of PyQt the other day. This means that you can use Madabar Vocab under Windows now! Just follow the instructions on the Download page.

/python/madabar_vocab | thisentry | comments ()

Madabar Vocab 0.4 Released

The third official release of Madabar Vocab (v0.4) is available on the Download page.

This is still an alpha release, so you may encounter a message box with an ugly error message if you find a dark corner.

Release Highlights

  • Support for reading in WordQuiz Language (.wql) word lists
  • Some compatibility fixes for PyQt 3.14, Qt 3.1 and Python 2.2 (the fixes have not been tested on those platforms yet)

/python/madabar_vocab | thisentry | comments ()

Steve Holden on PyCon

Steve Holden summarised a whole bunch of talks from the recently concluded PyCon on his blog. Interesting notes on Python 2.5, Django, Dabo, Series60, among other things.

/python | thisentry | comments ()

Python and Star Wars

In Steve Holden's post on Python at Industrial Light and Magic (the company responsible for the special effects in the Star Wars movies)...

I have heard (from staffers I have met at conferences) that the company employs in excess of seven hundred Python programmers. Here's what Tommy Burnette, ILM's Senior Technical Director, is on record as saying "Python plays a key role in our production pipeline. Without it a project the size of Star Wars: Episode II would have been very difficult to pull off. From our crowd rendering to batch processing to compositing, Python binds all things together." Philip Peterson, a Principal Engineer for R&D adds "Python is everywhere at ILM. It's used to extend the capabilities of our applications, as well as providing the glue between them. Every CG image we create has involved Python somewhere in the process".


/python | thisentry | comments ()

Possible Migration to Leonardo Blogging Software

I've been playing around with Leonardo, and will probably migrate to that (from PyBlosxom) in the near future.

Warning: If you are an RSS subscriber then the feed will stop working once I make the switch (since Leonardo only supports Atom). If it breaks, just check the site and subscribe to the Atom feed instead.

Motivation to move to Leonardo

  • Wiki-style editing (so I can easily edit my site from anywhere)
  • Category tagging (rather than sub-directories)

Barriers to moving to Leonardo

  • There's not much documentation (but apparently a wiki is coming soon)
  • I'm having a hard time uploading inline images via the wiki interface
  • Missing (or undiscovered) features that would be nice:
    • different menus for different parts of the site
    • different title banner for different parts of the site
    • access control for giving others limited editing rights
    • support for compiling pages to static content

As for the feature wishlist, I might take a crack at implementing some of them, but first things first.

I briefly investigated NewsBruiser, but it seems too hard to make it look pretty.

/python | thisentry | comments ()

GPL packaged PyQt for Windows

I discovered a GPL packaged PyQt for Windows. It's available here:

It's very simple to install - just run the executable and follow the prompts.

At last! Full free cross-platform PyQt is now a reality. It's a shame that the pyqt-mac package is so large (> 60MB) though.

/python/pyqt | thisentry | comments ()

Renaissance Man

By the way, I think I've figured out why Leonardo is so named. The article seems to be missing James's picture though... :-P

/python | thisentry | comments ()

Unit Tests as Standards

Are standards best defined by documents, reference implementations or referencesource code? Perhaps unit tests are the answer!

Patrick Logan (Making it Stick) refers to an article by John Udell musing on whether standard (open source) implementations are more valuable than the standard specification documents.

I think that well documented unit tests would be better still. I often meditate on the saying "the proof of the pudding is in the tasting". Well-written unit tests serve as good pudding tasters. The purpose of standards is to specify interfaces. Unit Tests concisely define how a system behaves under various conditions. They have the added benefit that they can be run against a candidate implementation and directly measure the compliance to the standard.

Unit tests are also compatible with the closed-source parts of the world. They only interact with the interface of a system. The unit tests should define all behaviours that together are sufficent to meet the standard. If the test suite passes, then the implementation details are irrelevant, and no revelation of inner workings is necessary. The test suite can help in determining whether the problem lies in an implementation as opposed to a user or external component relying on implementation side-effects.

Unit tests can also be successfully integrated into documentation. It is much easier and clearer to do so than intregating reference implementation code into the documentation, which tends to include distracting details. An excellent example of this integration is the doctest module included with Python. In fact with Python+doctest you can incorporate documentation, unit tests together with a reference implementation.

Doctests (unit tests intregated into documentation) generally consist of a few annotated examples of normal cases, plus the important edge cases. The doctest approach encourages frequent examples. Examples are the often the best way to communicate an idea or requirement, and resolve a lot of the ambiguity inherent in normal language. On that note, I really should lead by example and provide an example of doctests as examples...

"""Demonstrate doctests as specifications. """

__author__ = 'Tim Wegener '

import types
import doctest

def fibonacci(n):
    """Return the n-th Fibonacci number.

    The function is used like so:
    >>> fibonacci(7)

    By definition, the following hold:
    >>> fibonacci(0)
    >>> fibonacci(1)

    For other values of n greater than 1, F(n) = F(n-1) + F(n-2)
    >>> fibonacci(2)
    >>> fibonacci(3)
    The result is undefined for negative and non- integers.

    >>> fibonacci(-1)
    Traceback (most recent call last):
    ValueError: result is undefined for negative integer n

    >>> fibonacci(1.4)
    Traceback (most recent call last):
    ValueError: result is undefined for non-integer n

    >>> fibonacci(1j)
    Traceback (most recent call last):
    ValueError: result is undefined for non-integer n
    if not isinstance(n, int):
        raise ValueError("result is undefined for non-integer n")
    if n < 0:
        raise ValueError("result is undefined for negative integer n")

    if n == 0:
        result = 0
    elif n == 1:
        result = 1
        f_n_minus_2 = 0
        f_n_minus_1 = 1
        result = 0
        for i in range(2, n+1):
            result = f_n_minus_1 + f_n_minus_2 
            f_n_minus_2 = f_n_minus_1
            f_n_minus_1 = result
    return result

def run_tests():
    """Run all doctests in the module."""

    import doctest

# Define behaviour when this module is called as a script.
if __name__ == '__main__':

/python | thisentry | comments ()

Leonardo's name - the truth!

In a recent post, I speculated on how the Leonardo CMS program got its name. James Tauber referred me to the real reason.

This reminds me of the way I felt after reading "Into The Heart" - a book about the meanings of various U2 songs, gleaned from interviews with the band. I was disappointed, as they mostly seemed a bit more mundane than the interpretations I came up with.

In any case, I bags the name 'DiCaprio' if ever I write my own website management software. ;-)

/python/leonardo | thisentry | comments ()

Moving to new blog

I've started a new techblog. This will be for geek related topics. I've already written a couple of posts, so check it out!

For the new blog I have migrated to Wordpress. This lowers the barrier for me to write new entries (I can write them online) and has plenty of nice blog features such as Atom 1.0 feeds, comment feeds and various plugins.

I'm planning to wind up this blog (my old pyblosxom blog), but am leaving it up for the moment, as it still gets visits from time to time.

Don't forget to update your feeds!

/ | thisentry | comments ()

My new daughter

This week I've become a doting dad of my new beautiful baby daughter. Well done to my wife for carrying her for the last nine months, and powering on through the labour and sleepless nights.

/personal | thisentry | comments ()

Hello World

Welcome to my blog.

In honour of this inaugural post, the obligatory...

Hello, world!

/ | thisentry | comments ()

Leonardo migration so near, yet so far

After spending a large chunk of my weekend migrating this site to Leonardo, I hit a brick wall just before bringing it online. It seems that my webhost does not have bsddb module support in its python installation.


/python/leonardo | thisentry | comments ()