[Tutor] os.name on Windows 98

Tony Cappellini tony@tcapp.com
Thu Jul 10 19:16:24 2003


Hello Magnus,

> >Why does os.name return 'nt' on a Windows 98 machine ?
The question should have been "Why does os.name return the wrong name for
the OS on a Windows 98 machine ?


os.name obviously returns "some" name for the OS, but not the correct one
in this case. So the manual is of no use becaus eit does not explain
why the function returns the wrong name.

> You can also use sys.platform, and on Linux that says 'linux2',
this isn't any better, as it doesn't differentiate between Windows 2000,
and Win98.
What's the point of providing a function that doesn't return the correct
info, or ambiguous information ?


> which is a lot more detail, but on Win2k it says 'win32' and
> I guess is says the same on win98. Otherwise, that is really
> what you should use to figure out what kind of computer you
> are running on.
I won't use it if it doesn't give me the correct information.

> Why does your program need to know this?

Because different drivers are required to talk to various hardware, on
each OS, and I need to make the differentiation in order to know which
driver to use.

thanks

Tony