Finding out the OS distribution name (platform.py)
Cliff Crawford
cjc26 at nospam.cornell.edu
Fri Oct 22 20:53:12 EDT 1999
Pada Fri, 22 Oct 1999 17:41:31 +0200, M.-A. Lemburg bilang:
| Thanks. So leaving the check out for FreeBSD is ok. What about other
| nifty OSes like BeOS, NetBSD, the new BSD-based MacOS (can't remember the
| name right now) ?
Mac OS X Server.
And it is NOT "nifty". :-P
I ran your module on OS X v1.02, here's the output I got:
-----
Python 1.5.2 (#1, 07/22/99, 20:33:35) [GCC Apple DevKit-based CPP 5.0]
on next5_3
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import platform
>>> platform.platform()
uname: illegal option -- p
usage: uname [-amnrsv]
'Rhapsody-5.5-Power_Macintosh'
>>> platform.system()
'Rhapsody'
>>> platform.node()
'amma'
>>> platform.release()
'5.5'
>>> platform.machine()
'Power Macintosh'
>>> platform.processor()
''
>>> platform.version()
'Kernel Release 5.5: Fri Jul 2 13:10:26 PDT 1999;
root(rcbuilder):Objects/kernel-154.14.obj~10/RELEASE_PPC Copyright (c)
1988-1995,1997-1999 Apple Computer, Inc. All Rights Reserved. '
-----
What's the -p option to uname supposed to do anyway? Print the processor
name? I think that's what the -m option is for.
Btw, Python compiles right out of the box on OS X Server. It's one of the
few un*x packages that I use that I DIDN'T have to patch. Thanks, Guido! :)
--
cliff crawford http://www.people.cornell.edu/pages/cjc26/
There are more stars in the sky than there are
-><- grains of sand on all the beaches of the world.
More information about the Python-list
mailing list