[Python-Dev] large file support
Sean Reifschneider
jafo@tummy.com
Mon, 17 Jun 2002 20:50:02 -0600
On Mon, Jun 17, 2002 at 04:28:23PM -0400, Jeremy Hylton wrote:
>On the platform I tried (apparently RH 7.1) it raises EOVERFLOW. I
>can extend posixpath to treat that as "file exists" tomorrow.
How about changing os.path.exists for posix to:
def exists(path):
return(os.access(path, os.F_OK))
I haven't done more than a few simple tests, but I believe that this would
provide similar functionality without relying on os.stat not breaking.
Plus, access is faster (on the order of 2x as fast stating a quarter
million files on my laptop).
Sean
--
I have never been able to conceive how any rational being could propose
happiness to himself from the exercise of power over others. -- Jefferson
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python