I just realized this may not work for all versions of Python. I can't remember when sys.__stdout__ showed up, but the finally clause isn't that important anyway. I'll check a better fix into the CVS tree. -Barry