[Tutor] os.name on Windows 98

Raymond Hettinger python@rcn.com
Sun Jul 13 05:33:02 2003


> > 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.


Try this (it's not pretty but it works):

>>> import os
>>> print os.popen('ver').read()

Windows Millennium [Version 4.90.3000]





Raymond Hettinger