In answer to the 2 replies, I had no references anywhere to 'self'. In order to post my code I rewrote 2 scripts containing just the relevant parts of the problem; these work. However, they are identical to my original code. So I have deleted the 'old' script2 and renamed the new one, and no problem. I don't know why it worked with one and not the other when they are identical, but I have what I want now.
Thanks for your replies. -Evan -- http://mail.python.org/mailman/listinfo/python-list