os.name

Emile van Sebille emile at fenx.com
Fri Jul 30 08:40:19 EDT 1999


on both my 95 and 98 boxes:

>>> os.name
'nt'
>>> os.environ('OS')
Traceback (innermost last):
  File "<pyshell#8>", line 1, in ?
    os.environ('OS')
AttributeError: no __call__ method defined

--

Emile van Sebille
emile at fenx.com
-------------------


Gordon McMillan <gmcm at hypernet.com> wrote in message
news:1278785134-25350540 at hypernet.com...
> 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