Thanks to everyone who replied. Kay and Mark put me on the right track immediately. Ben is quite right - the fragment that I posted couldn't have given that error, but I didn't want to post the whole thing - perhaps wrongly, I thought it wouldn't help clarify what I thought the problem was. And that was the real issue - I had managed to convince myself that I had a naming problem in one of my own modules somewhere.
If anyone is interested in the background, I'm a long time Perl programmer trying to learn Python by converting a small set of standard, locally developed Perl libraries. It's an edifying experience, and I can understand why some colleagues like Python so much. Again, thanks for the help, it's appreciated. Hook -- http://mail.python.org/mailman/listinfo/python-list