Finding out the OS distribution name

Markus Stenberg mstenber at cc.Helsinki.FI
Thu Oct 21 05:11:08 EDT 1999


"M.-A. Lemburg" <mal at lemburg.com> writes:
> Is there a way to find out the name of the OS distribution a script is
> running on ?

Short answer: No.

> E.g. I'd like a function that returns 'Redhat6.1'/'SuSE6.2' or
> 'Win95'/'Win98'/'WinNT' or 'MacOS8'/'MacOS9' etc.

Longer answer: It is possible to guess, but not trivially [by either
hugging filesystem tightly, or by TCP/IP fingerprinting]. And AFAIK there
isn't such a module available for Python, anyhow.

> -- 
> Marc-Andre Lemburg
> ______________________________________________________________________
> Y2000:                                                    71 days left
> Business:                                      http://www.lemburg.com/
> Python Pages:                           http://www.lemburg.com/python/

-Markus

-- 
`When you say "I wrote a program that crashed Windows", people just stare at
you blankly and say "Hey, I got those with the system, *for free*".'
	- Linus Torvalds




More information about the Python-list mailing list