os.name

Gordon McMillan gmcm at hypernet.com
Fri Jul 30 09:25:58 EDT 1999


Donn Cave writes:

> Holger Jannsen <holger at phoenix-edv.netzservice.de> writes:

> | It's because I need to differ between Win95, Win98 and WinNT....
> 
> Not clear, missing parts of speech, however, os.uname()...  Windows
> behavior unknown.

Windows gives  an AttributeError.

os.environ['OS'] gives "Windows_NT" on my NT box. Maybe some Win9xers 
could try it on theirs...

- Gordon




More information about the Python-list mailing list