[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

revisiting the "What am I running on?" question

On 20/02/2019 08.13, eryk sun wrote:
> On 2/19/19, Chris Angelico <rosuav at gmail.com> wrote:
>> The value "win32" means Windows (or, more technically, "Windows NT
>> family", as opposed to Win95/Win98 - but since Win XP, that's the only
>> type of Windows there is). If you actually care about whether it's a
>> 32-bit or 64-bit OS, you can look at sys.maxsize.
> I didn't start using Python until long after I stopped using Windows
> 9x. Do you recall what sys.platform was for Windows 9x? It was also
> the Win32 API, but layered over a 32-bit VMM that extended/replaced
> 16-bit DOS. There were many differences between it and the NT
> implementation of Win32, such as no security or Unicode, and a
> completely different console subsystem.
> IMO, "win32" was never the right platform name, but we're stuck with
> it. The correct platform name is simply "windows". Win32 is also the
> legacy API name. Nowadays the preferred name is the Windows API, or
> WINAPI for short. Win32 is also the legacy 32-bit ABI name. It's an
> okay name, but I'd prefer if we could change it to "win-ia32", which
> would parallel the 64-bit ABI name "win-amd64".

I'm fairly sure "win32" was used on W9x as well. In any case it *was*
correct at the time, as early versions of Python also ran on DOS and
Windows 3.1. "windows" would not have been suitable.

But yeah, we're stuck with it. There are obviously good reasons that it
wasn't changed when we moved to amd64, but it is annoying.

-- Thomas