[Tutor] os.name on Windows 98

Tim Peters tutor@python.org
Thu Jul 10 20:33:02 2003


[Tony Cappellini]
> 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.

Read Magnus's reply again.

> What's the point of providing a function that doesn't return the
> correct info, or ambiguous information ?

If you're running on Windows and need access to Windows internals, you
should install the Python Win32 extensions.  Then you can use the Win32
API's GetVersionEx() to get more info than most people have any idea what to
do with <wink>.  Starting in Python 2.3, you can get the same info from the
new-in-2.3 sys.getwindowsversion() function (which exists only on Windows
Python builds).