Duncan, Consider submitting this to the Python Cookbook (http://aspn.activestate.com/ASPN/Python/Cookbook/) if you get a moment. --- Rupert Rupert Scammell rupe at metro.yak.net http://metro.yak.net