Thanks Martin. I came across a bug in mod_python which was due to mod_python relying on the result of tempfile.TemporaryFile() to be a FileType. The more I think about it, the more the checks in mod_python are just plain wrong. Jonathan.