Testing for win95 vs. win98 vs. winNT?

Evan Gibson egibson at connect.com.au
Fri May 7 01:29:46 EDT 1999


On Thu, May 06, 1999 at 09:25:47PM -0700, David Ascher wrote:
> 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 could do a  os.path.exists  of that dll if that's what you care
about... It assumes standard installation ("C:\windows" or whatever) which
can be an occasional problem especially with people running things like
Metaframe, but it'll work in most cases and you don't need any special
extensions at all...

In fact, if you knew enough about all the different operating systems you
could work out whether you were on dos or os/2 or something else as well...

 
> --david ascher

-- 
  Evan ~ThunderFoot~ Gibson    ~ nihil mutatem, omni deletum ~
      May the machines watch over you with loving grace.




More information about the Python-list mailing list