>2GB files with python

ethan mindlace fremen mindlace at imeme.net
Fri Mar 3 03:35:39 EST 2000


I've got a file >2GB in Linux.  I've enabled large files[1] and ls
reports the size as 2,990,538,752 bytes.

os.path.getsize() reports the size as -1,304,428,544.

I compiled python with these flags:
#define _LARGEFILE_SOURCE 1
#define _LARGEFILE_64_SOURCE 1
#define _FILE_OFFSET_BITS 64

although it does say that off_t is 4, long is 4 too and long_long is 8.

What am I doing wrong?

thanks,
-- 
ethan mindlace fremen - mindlace at imeme.net
good design is as close as I want to get to ideology.




More information about the Python-list mailing list