Thanks, Peter! I've checked this in, but I have one nagging doubt: it's not a standard ANSI C function, so may not exist on all platforms? --Guido van Rossum (home page: http://www.python.org/~guido/)