[Python-Dev] large file support

Guido van Rossum guido@python.org
Mon, 17 Jun 2002 16:08:26 -0400


> However, I'm still unhappy with one thing related to large file
> support.  If you've got a Python that doesn't have large file support
> and you try os.path.exists() on a large file, it will return false.
> This is really bad!  Imagine you've got code that says, if the file
> doesn't exist open with mode "w+b" :-(.

Wow, that sucks.

> I'd be happiest if os.path.exists() would work regardless of whether
> Python supported large files.  I'd be satisifed with an exception that
> at least let me know something went wrong.

Is there an errno we can test for?  stat() for a non-existent file
raises one exception, stat() for a file in a directory you can't read
raises a different one; maybe stat of a large file raises something
else again?  I think os.path.exists() ought to return True in this case.

--Guido van Rossum (home page: http://www.python.org/~guido/)