[SciPy-User] SciPy-User Digest, Vol 80, Issue 28

Tom Kuiper kuiper at jpl.nasa.gov
Wed Apr 14 19:11:16 EDT 2010


> Date: Wed, 14 Apr 2010 12:25:18 -0500
> From: Jorge E. ?Sanchez Sanchez         <hnry2k at hotmail.com>
> Subject: Re: [SciPy-User] Python seek argument type
>
> As far as I understand the biggest long int in C you can manage in a 32bit machine is 2147483647, in order to work with bigger numbers than this you had to use the gmp library (general multiple precision) which  also has a python module gmpy, you can have more information from http://gmpy.sourceforge.net/.
>   
Thank you.  I just downloaded the Debian package for the Python module.
> Date: Wed, 14 Apr 2010 10:54:33 -0700
> From: Nathaniel Smith <njs at pobox.com>
> Subject: Re: [SciPy-User] Python seek argument type
>
> The whole traditional POSIX filesystem API has a 64-bit version -- on
> Linux at least, you use syscalls that take "off_t" instead of "int".
> For fseek the corresponding syscall is fseeko. And then you compile
> with -D_FILE_OFFSET_BITS=64.
>
> Python really should be taking care of all that mess for you, though.
> Since Python runs on both systems with and without support for large
> files, you do have to make sure that it's using the right code. Is
> your Python built by you, or does it come from some distributor?
It's what in the current Debian 'stable' (lenny) distribution.
> Or check if any bugs were fixed in this area in a later Python
> point release? Since this problem doesn't have anything to do with
> scipy, you might find more knowledgeable help on python-list.
>   
You are right but I didn't think I was dealing with a Python bug until 
now.  I'll check it.
> I can confirm that with Ubuntu's Python 2.5.4, fd.seek(2252639972, 0)
> works fine.
>   
So I assume that a bug was filed and fixed.  I will reflect overnight on 
the merits of upgrading to the 'testing' distribution.

Thanks for all the advice.  At least this time I don't feel so dumb.

Tom



More information about the SciPy-User mailing list