sys.platform on UNIX

User & ingo at hilbert.ingoblank.com
Sun Jul 7 14:06:48 EDT 2002


Hi,

I need a boolean function isUnix(), which returns true,
if executed on a UNIX OS.

I think it's best, to check the 'sys.platform' string.

However, there are lots of possibilities:
'linux*','freebsd*','sunos*','solaris*','irix*','osx*','hpux' ... etc.

Q: Is there any "official" statement about distinct contents
   of 'sys.platform' ?

Or is there a better approach to solve this problem?

Thanks

--ingo

voy NG arktb QBG qr [rot13]




More information about the Python-list mailing list