sys.maxint in Python 2.6.1 (amd64) on Windows XP x64

Lin shaomumu at
Tue Dec 16 20:22:53 CET 2008

> > I installed the amd64 version of Python 2.6.1 on my Windows XP x64
> > system. I was expecting sys.maxint to be 9223372036854775807 (or 2 ^63
> > -1), but instead I got 2147483647 (i.e., 2^31-1) just like what I got
> > from a 32-bit version of Python. Is this by design or does it indicate
> > a bug or an installation problem? Thank you very much!
> This is by design. In their infinitive wisdom Microsoft has decided to
> make the 'long' C type always a 32 bit signed integer - even on 64bit
> systems. On most Unix systems a long is at least 32 bit but usually
> sizeof(ptr).

Ah, this makes sense. Thanks...... The main reason I'm trying 64-bit
Python is that I want to write files bigger than 4GB. This should work
on Windows x64, right? (i.e., are the pointers bona fide 64 bit?)


More information about the Python-list mailing list