Testing for win95 vs. win98 vs. winNT?

David Ascher da at ski.org
Fri May 7 12:21:53 EDT 1999


On Fri, 7 May 1999, Mark Hammond wrote:

> David Ascher wrote in message ...
> >How can a Python program guess with a stock 1.5.2 (none of those fancy
> >shmancy aussie win32 extensions!) whether it's running on win95, win98 or
> >winNT?  (In truth, I care only about whether a specific DLL is installed,
> >but that correlates with win95 vs. the others).
> 
> Well, you did say *guess* :-)
> 
> NT has:
> >>> os.environ['OS']
> 'Windows_NT'
> 
> And a number of other variables that don't exist on 95/98 by default.  Im
> not sure if _all_ NT machines have that variable by default , but I sure
> didnt add it to my machine (and it exists on all NT W/S and Servers I have
> seen)

Ah, yes, that's the kind of hack I was looking for.  Except I need to know
about win95 vs. win98.  







More information about the Python-list mailing list